Q. What is the result of the following program?
Code:public static synchronized void main(String[] args) throws
InterruptedException {
Thread f = new Thread();
f.start();
System.out.print("A");
f.wait(1000);
System.out.print("B");
}
β
Correct Answer: (C)
A will be printed, and then an exception is thrown.