You are not logged in.
Pages:: 1
#1 2015-06-10 10:06:23
Public Class Test:
Question:
public class Test
{
public static void main(String [] args)throws Exception
{
Object object = new Object();
synchronized (Thread.currentThread())
{
object.wait();
object.notify();
}
}
}
What is the result?
Option A):
Compiles successfully
Option B):
Throws an IlleagalStateException
Option C):
Throws an IllegalMonitorStateException
Option D):
Throws an InterruptedException
Correct Answer is Option C):
Throws an IllegalMonitorStateException
You cannot discover the new oceans unless you have the courage to lose the sight of the shore.
Offline
2015-06-10 10:06:23
- Advertisement
- Ads By Google
Re: Public Class Test:
\n
Pages:: 1