Join The Discussion

Comments ( 2 )

  1. Harish Devaraj
    Harish Devaraj :
    2 years ago

    49.import javax.swing.*;
    class Tst
    {
    public static void main(String ... a)
    {
    JFrame j1=new JFrame("My Frame");
    JFrame j2=j1;
    JFrame j3=j2;
    j1.setVisible(true);
    j2.setVisible(true);
    j3.setVisible(true);
    }
    }
    (2 Points)

  2. Hari Haran
    Hari Haran :
    2 years ago

    run method in thread used to perform actions. it must surely overrides in our program then only start method can able to access and start the thread execution

Related Questions on Threads

What will be the output of the following program code?

A. The program does not compile because this cannot be referenced in a static method.

B. The program compiles fine, but it does not print anything because t does not invoke the run() method

C. The program compiles and runs fine and displays test on the console.

D. None of the above