Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Wait method and sleep method  RSS feed

 
Chathura Ma
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I need to know what is the different between wait method and sleep method.. is the functionality of those 2 methods equivalent ?
Specially wait(100) is one??? there is an overloaded method in wait we can pass a long value

Thanks
 
prem pillai
Ranch Hand
Posts: 87
Java Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before posting a query , just try searching the forum ; Somebody else might had the same query as yours ...and already answered.

Also have a look at javadocs for sleep() and wait()
http://download.oracle.com/javase/6/docs/api/java/lang/Thread.html#sleep(long)
http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#wait()
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!