Thread: Java Threads
View Single Post
  #11   Spotlight this post!  
Unread 22-02-2011, 21:22
Aaron V Aaron V is offline
Registered User
FRC #1325 (Inverse Paradox)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Ontario, Canada
Posts: 13
Aaron V is an unknown quantity at this point
Re: Java Threads

Alright, thanks everyone - I think I understand.

By default there is only one main thread. If I want to create a thread I can use the Thread class and can pass it a class inherited from "Runnable." Then no pauses in the run function will distract the main code.

To pause the thread I can either use the Timer class or the wait function, but the wait function requires a try...catch function.

Thanks for the quick responses.
Reply With Quote