Menu
Question Index
...

What will be the output of the following program?

public class TestThread implements Runnable
{
    public static void main(String[] args)
    {
        TestThread t = new TestThread();
        t.start();
    }
    public void run() {    }
}


The program does not compile because the start() method is not defined in the Test class.
The program compiles, but it does not run because the start() method is not defined.
The program compiles, but it does not run because the run() method is not implemented.
This program will compiles and runs successfully

Doubts

Problems

Topic: Creation Of Threads In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App