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
What is the argument in java?
What is the purpose of static methods and static variables?
What is an object’s lock and which object’s have locks?
What do bitwise operators do?
What is the difference between access specifiers and access modifiers in java?
In case of inheritance what is the execution order of constructor and destructor?
How to perform merge sort in java?
What is a parameter in a function?
what is an objects lock and which objects have locks? : Java thread
What is fundamental datatype?
Java Compiler is stored in JDK, JRE or JVM?
Can we have any code between try and catch blocks?
Is string is a class in java?
What is the association?
What about main thread in java?