public class A
{
public static void main( String args[] )
throws Exception
{
A a = new A();
synchronized(a)
{
a.wait(0);
}
System.out.println( "Done!" );
}
}
什么也看不见。
...全文
42回复打赏收藏
Object.wait(0),小心
public class A { public static void main( String args[] ) throws Exception { A a = new A(); synchronized(a) { a.wait(0); } System.out.println( "Done!" ); } } 什么也看不见。