<< < 7 8 9 10 11 12 13 14 15 16 17 > >>   Sort: Date

Can an object's finalize() method be invoked while it is reachable?
Can an object's finalize() method be invoked while it is reachable? An object's finalize() method cannot be invoked by the garbage collector while the object is still reachable. However, an object's finalize() method may be invoked by other objects.
2012-10-03, 2524👍, 0💬

How to make an array copy from System?
How to make an array copy from System? There is a method called arraycopy in the System class. You can do it: System.arraycopy(sourceArray, srcOffset, destinationArray, destOffset, numOfElements2Copy); When you use this method, the destinationArray will be filled with the elements of sourceArray at ...
2012-09-04, 2524👍, 0💬

In System.out.println(),what is System,out and println,pls explain?
In System.out.println(),what is System,out and println,pls explain? System is a predefined final class,out is a PrintStream object acting as a field member and println is a built-in overloaded method in the out object.
2012-08-20, 2522👍, 0💬

What is the purpose of the finally clause of a try-catch-finally statement?
What is the purpose of the finally clause of a try-catch-finally statement? The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught.
2012-07-09, 2521👍, 0💬

What is an object's lock and which objects have locks?
What is an object's lock and which objects have locks? An object's lock is a mechanism that is used by multiple threads to obtain synchronized access to the object. A thread may execute a synchronized method of an object only after it has acquired the object's lock. All objects and classes have lock...
2012-11-07, 2520👍, 0💬

How does Java handle integer overflows and underflows?
How does Java handle integer overflows and underflows? It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.
2012-09-24, 2520👍, 0💬

What's the difference between an interface and an abstract class?
What's the difference between an interface and an abstract class? An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implemen...
2012-05-21, 2520👍, 0💬

What is the difference between static and non-static variables?
What is the difference between static and non-static variables? A static variable is associated with the class as a whole rather than with specific instances of a class. Non-static variables take on unique values with each object instance.
2012-07-26, 2519👍, 0💬

Explain the usage of the keyword transient?
Explain the usage of the keyword transient? This keyword indicates that the value of this member variable does not have to be serialized with the object. When the class will be de-serialized, this variable will be initialized with a default value of its data type (i.e. zero for integers).
2012-07-31, 2518👍, 0💬

What is thread?
What is thread? A thread is an independent path of execution in a system.
2012-06-07, 2517👍, 0💬

What's the difference between the methods sleep() and wait()
What's the difference between the methods sleep() and wait() The code sleep(1000); puts thread aside for exactly one second. The code wait(1000), causes a wait of up to one second. A thread could stop waiting earlier if it receives the notify() or notifyAll() call. The method wait() is defined in th...
2012-09-11, 2511👍, 0💬

What is synchronization and why is it important?
What is synchronization and why is it important? With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of...
2012-09-17, 2507👍, 0💬

What is weak reference in Java
What is weak reference in Java A weak reference is one that does not prevent the referenced object from being garbage collected. You might use them to manage a HashMap to look up a cache of objects. A weak reference is a reference that does not keep the object it refers to alive. A weak reference is...
2012-09-10, 2506👍, 0💬

What is the difference between the JDK 1.02 event model and the event-delegation model introduced with JDK 1.1?
What is the difference between the JDK 1.02 event model and the event-delegation model introduced with JDK 1.1? The JDK 1.02 event model uses an event inheritance or bubbling approach. In this model, components are required to handle their own events. If they do not handle a particular event, the ev...
2012-12-27, 2505👍, 0💬

What value does read() return when it has reached the end of a file?
What value does read() return when it has reached the end of a file? The read() method returns -1 when it has reached the end of a file.
2012-11-05, 2505👍, 0💬

What is the relationship between the Canvas class and the Graphics class?
What is the relationship between the Canvas class and the Graphics class? A Canvas object provides access to a Graphics object via its paint() method.
2012-11-02, 2505👍, 0💬

What happens when you invoke a thread's interrupt method while it is sleeping or waiting?
What happens when you invoke a thread's interrupt method while it is sleeping or waiting? When a task's interrupt() method is executed, the task enters the ready state. The next time the task enters the running state, an InterruptedException is thrown.
2012-12-20, 2504👍, 0💬

What method is invoked to cause an object to begin executing as a separate thread?
What method is invoked to cause an object to begin executing as a separate thread? The start() method of the Thread class is invoked to cause an object to begin executing as a separate thread.
2012-10-29, 2504👍, 0💬

What is the difference between a Window and a Frame?
What is the difference between a Window and a Frame? The Frame class extends Window to define a main application window that can have a menu bar.
2012-07-13, 2503👍, 0💬

Parsers? DOM vs SAX parser
Parsers? DOM vs SAX parser Parsers are fundamental xml components, a bridge between XML documents and applications that process that XML. The parser is responsible for handling xml syntax, checking the contents of the document against constraints established in a DTD or Schema. DOM 1. Tree of nodes ...
2012-08-23, 2501👍, 0💬

What advantage do Java's layout managers provide over traditional windowing systems?
What advantage do Java's layout managers provide over traditional windowing systems? Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platfo...
2012-07-25, 2501👍, 0💬

How can you minimize the need of garbage collection and make the memory use more effective?
How can you minimize the need of garbage collection and make the memory use more effective? Use object pooling and weak object references.
2013-04-19, 2500👍, 0💬

What are use cases?
What are use cases? A use case describes a situation that a program might encounter and what behavior the program should exhibit in that circumstance. It is part of the analysis of a program. The collection of use cases should, ideally, anticipate all the standard circumstances and many of the extra...
2012-08-15, 2495👍, 0💬

What is the difference between shallow copy and deep copy?
What is the difference between shallow copy and deep copy? Shallow copy shares the same reference with the original object like cloning, whereas the deep copy get a duplicate instance of the original object. If the shallow copy has been changed, the original object will be reflected and vice versa.
2012-08-24, 2490👍, 0💬

<< < 7 8 9 10 11 12 13 14 15 16 17 > >>   Sort: Date