This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Thread.sleep() Method

 
Thomas Markl
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why does this compile (Thread.sleep())???


And this (sleep() )doesn’t compile:
[ edited to correct formatting -ds ]
[ September 07, 2002: Message edited by: Dirk Schreckmann ]
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because sleep() is a static method of the Thread class. TestMyThread7 does not extend the Thread class nor does it have its own sleep() method so it fails to compile.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic