What is the run() method?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the run() method?
Rating:
The run() method belongs to the Runnable interface. It is used to instantiate a new thread.
The signature of the run() method is as follows:
The run() method is very similar to the main() method, as it is the entry point for a thread. The run() method can be called either directly or through the start() method, in which case a new thread will be started. Calling the run() method directly does not start a new thread.
When a thread comes out of the run() method, it is said to be dead. Once dead, it cannot be restarted by any means.
Rating:
Was this information helpful?
Other articles
- Skills required for Sun test CX310-055
- What is the bitwise AND operator?
- What is the hashCode() method?
- What is the File class?
- What is the getDateTimeInstance method?