• Post Reply Bookmark Topic Watch Topic
  • New Topic

why sleep is static in thread  RSS feed

 
saravanan ragu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Thread class why sleep is static ,join is non static. I know static is used for class level,non static for object level
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
saravanan ragu wrote:In Thread class why sleep is static ,join is non static. I know static is used for class level,non static for object level

What possible scenario you can think of? I hope you are aware of sleep and join operations.

Hint: Do you really need an object to invoke 'sleep'? Do you really need an object to invoke 'join'?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!