Home » Java Programming » Threads

What will be the output of the program? class MyThread extends Thread { public static void main(String [] args) { MyThread t = new MyThread(); /* Line 5 */ t.run(); /* Line 6 */ } public void run() { for(int i=1; i < 3; ++i) { System.out.print(i + ".."); } } }

← Previous Next →

Discussion & Comments

No comments yet. Be the first to comment!