diff b/w sleep(1000) and wait(1000)?

Answer Posted / gokul d

The thread which is under sleep state can be resumed back
automatically after the time mentioned.But thread under
wait has to be resumed back only by calling the notify()
method.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are different ways in which a thread can enter the waiting state? : Java thread

490


Can we override the static method?

576


What is the difference between JVM and JRE?

616


What is the difference between overriding and overloading in OOPS.

553


What is vector?

587






Explain what pure virtual function is?

593


Which is easier .net or java?

641


How are the elements of a gridbaglayout organized in java programming?

516


What are the rules for variable declaration?

499


What's the purpose of using break in each case of switch statement?

506


What is files manifesting?

1725


What does flag mean in java?

540


Is static a singleton?

521


Lowest Common ancestor in a Binary Search Tree and Binary Tree.

551


Are arrays static in java?

578