198k views
2 votes
Which method is the starting point in a user-defined Java thread class?

1) run()
2) start()
3) sleep()
4) main()

1 Answer

4 votes

Final answer:

In a user-defined Java thread class, the start() method is the starting point that initiates the thread by calling the run() method.

Step-by-step explanation:

The start() method is the starting point for a user-defined Java thread class. When a thread is instantiated, you call the start() method on the instance of your thread.

The start() method is a part of the Thread class in Java and is responsible for starting a newly created thread. It does this by calling the run() method of the Thread class or its subclass where the actual work of the thread is defined.

User Halest
by
7.9k points