Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

  1. Which of these statement is incorrect?
  2. A.
    A thread can be formed by implementing Runnable interface only.
    B.
    A thread can be formed by a class that extends Thread class.
    C.
    start() method is used to begin execution of the thread.
    D.
    run() method is used to begin execution of a thread before start() method in special cases.

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    run() method is used to define the code that constitutes the new thread, it contains the code to be executed. start() method is used to begin execution of the thread that is execution of run(). run() itself is never used for starting execution of the thread.


Be The First To Comment