public Class Test implements Runnable{
public void run(Thread t)
{
System.out.println(“Running...”);
}
public static void main(String [] args)
{
new thread(new Test()).start();
}
}
What is the result?
Options
- Compile error.
- Exception is thrown.
- Running… will be printed
- Program exists without printing anything.
CORRECT ANSWER : Compile error.
Write your comments