• Post Reply Bookmark Topic Watch Topic
  • New Topic

begin learning thread,somebody give me some suggestion  RSS feed

 
Jeffrey Ye
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so many new codes:suspend,sleep,run,Runnable...

how to learn thread

why no construct function,no "main" in many examples?

then,how the thread begin to run?
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you had a look at the Java Tutorial chapter on Threads?
Threads have a constructor. The API documentation for java.lang.Thread demonstrates the use of it.
The main method is the initial entry point of a program. Threads are lightweight processes created within a program, so they don't have a main.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!