What is the life cycle of Thread ?

Answer Posted / shajin.a.xavier

Multithreading is the mechanism in which more than one
thread run independent of each other within the process.
wait (), notify () and notifyAll() methods can be used for
inter-thread communication and these methods are in Object
class. wait() : When a thread executes a call to wait()
method, it surrenders the object lock and enters into a
waiting state. notify() or notifyAll() : To remove a thread
from the waiting state, some other thread must make a call
to notify() or notifyAll() method on the same object.

Is This Answer Correct ?    16 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can It is possible to synchronize the constructor of a Java Class?

593


Why unicode is important?

467


Define max and min heap, also the search time of heap.

591


What is the purpose of using the java bean?

570


What does super keyword do?

562






Give example to differentiate between call by value and call by reference.

591


How does a for loop work?

508


Is void a wrapper class?

536


What are different types of encoding?

583


What is a double vs float?

538


What are the advantages of autoboxing?

538


What is the access scope of a protected method?

562


What is the purpose of static keyword in java?

519


What is assembly condition codes?

558


What are the pillars of java?

489