Multiple choice technology programming languages

Will it run without error: Thread th = new Thread(new Thread());

  1. It will run without error

  2. Runtime Error

  3. Compilation Error

  4. None of all

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The Thread class has a constructor Thread(Runnable target), and Thread itself implements Runnable. Passing a Thread object as the Runnable target is valid syntax - it compiles and runs without error. The new Thread object wraps the existing Thread as its Runnable target.