1.

What will be the output of the program?
 public class WaitTest { public static void main(String [] args) { System.out.print("1 "); synchronized(args) { System.out.print("2 "); try { args.wait(); /* Line 11 */ } catch(InterruptedException e){ } } System.out.print("3 "); } } 

A. It fails to compile because the IllegalMonitorStateException of wait() is not dealt with in line 11.
B. 1 2 3
C. 1 3
D. 1 2
Answer» E.


Discussion

No Comment Found