A
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");
}
InterruptedException {
Thread f = new Thread();
f.start();
System.out.print("A");
f.wait(1000);
System.out.print("B");
}
- Correct Answer - Option(C)
- Views: 11
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.