Threads block on i/o (that is enters the waiting state) so that other threads may executewhile the i/o Operation is performed.
Latest Answer : Sir, i want one doubt, how to open the new window from click the java frame using handling event. please give the idea to me. i know that it's a comment page. But u have using the doubt page. thanking u. ...
Objects that subclass the Observable class maintain a list of observers. When anObservable object is updated it invokes the update() method of each of its observers tonotify the observers that it has changed
Latest Answer : Observer observe only those class which are Observable. ...
With respect to multithreading, synchronization is the capability to control the access ofmultiple threads to shared resources. Without synchronization, it is possible for onethread to modify a shared
Latest Answer : Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time. In a practical point of view assume that two threads are trying to update bank balance at the same time!!! How we can solve this issue the answer is sychronization. ...
When a thread terminates its processing, it enters the dead state.
Latest Answer : the thread enters the 'TERMINATED' state. at this point, the thread is not accessible ...
When a task invokes its yield() method, it returns to the ready state. When a task invokesits sleep() method, it returns to the waiting state.
Latest Answer : yield method is mainly used to release the lock of resource and pull up in to steady state from wait pool. Sleep() will pull the thread to sleep for the given time. It will throws exception while trying to intrupt in b/w the sleep state ...
A thread enters the waiting state when it blocks on I/O.
Latest Answer : When a thread blocks on I/O, it enters to BLOCKED state. A thread enters WAITING state, while a thread calls wait(), and it will come back to READY state, while other threads call notify() or notifyAll(). The wait-notify model is called monitor pattern. ...
A thread is in the ready state after it has been created and started.
After a thread is started, via its start() method or that of the Thread class, the JVMinvokes the thread's run() method when the thread is initially executed.
Latest Answer : when its start() method is called ...
The start() method of the Thread class is invoked to cause an object to begin executing asa separate thread.
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 ...