The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.
Latest Answer : Please Stop using JAVA 1.2 Coz there are many methods which are deprecated in Java 1.4. For thread stop, suspend are deprecated in JAva 1.4 ...
It must provide all of the methods in the interface and identify the interface in itsimplements clause.
Latest Answer : interface enhance the concepts of inheritence. by calling multiple interfaces to class we can also inherinting more than a class indirectly ...
Commas are used to separate multiple statements within the initialization and iterationparts of a for statement.
The wait(),notify(), and notifyAll() methods are used to provide an efficient way forthreads to wait for a shared resource. When a thread executes an object's wait() method, itenters the waiting state.
Latest Answer : wait() will move the thread to sleep state allowing for the other thread to execute. notify() will trigger back the wait() thread to ready state and to execute further. notifyAll() will trigger all wait() threads to ready state. Later, it will ...
An object's lock is a mechanism that is used by multiple threads to obtain synchronizedaccess to the object. A thread may execute a synchronized method of an object only afterit has acquired the object's
If a thread attempts to execute a synchronized method or synchronized statement and isunable to acquire an object's lock, it enters the waiting state until the lock becomesavailable.
The only statements for which it makes sense to use a label are those statements that canenclose a break or continue statement.
An event-listener interface defines the methods that must be implemented by an eventhandler for a particular kind of event. An event adapter provides a default implementationof an event-listener interface.
The paint() method supports painting via a Graphics object. The repaint() method is usedto cause paint() to be invoked by the AWT painting thread.
Latest Answer : The difference between paint() and repaint()Paint():- The paint() method is called automatically whenever the window needs to be refreshed.The programmer never calls paint() .repaint():-Programmer calls repaint() in order to obtain a rendering.repaint() ...
Two methods may not have the same name and argument list but different return types.
Latest Answer : Two methods must have same name with different argument list , different return types. Only different return types is not sufficient. ...