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

explain what is transient variable in java?

618


What is the default access specifier for variables and methods of a class?

559


Can you access non static variable in static context?

549


What is the difference between scrollbar and scrollpane?

604


Explain where variables are created in memory?

575






What is tostring () method?

534


What does || || mean in math?

509


Can we extend a class with private constructor?

519


What do you mean by buffering?

546


Is java same as core java?

578


How many types of gc are there in java?

552


Can one thread block the other thread?

599


What is a constructor, constructor overloading in java?

520


How use .contains in java?

614


Can two objects have same hashcode?

560