What is the output for the below code ? public class Test extends Thread{ public static void main(String argv[]){ Test b = new Test(); b.start(); } public void run(){ System.out.println("Running"); } }

  1. Compilation clean and run but no output

  2. Compilation and run with the output "Running"

  3. Compile time error with complaint of no Thread import

  4. Compile time error with complaint of no access to Thread package


Correct Option: B

Find more quizzes: