关于线程的问题(在线给分) wait();改为synchronized(this) { wait();} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 test2 t2=new test2();t2.start();test2 not only is a object, but also is a Thread.Yan can synchronized a object, but you can't do it for Thread. in the class test2,public synchronized void run(){............} 补充:in the class test2,public synchronized void run(){............}如果你要notify()一个线程,那么这个线程的run()方法必须是同步的。synchronized 急! 急!! 高分求助关于线程和进度条的问题,急 查询的时候自己简化了一下条件,大家来看看怎么样。 关于拼音分割的实施办法 我想学JAVA,用什么编译器好, 请帮忙编写一下程序,给分!!! 画图求助,给一个已定义r g b值的点画出它相应的颜色,应该怎么做? 各位前辈,小弟初学java,能不能推荐一些书啊? 关于SESSION的问题?? 如何在Linux下设置CLASSPATH? 帮忙看这段程序那里有错误??谢谢 关于j2ee中DataSource getConnection();和j2se中 DriverManager.getConnection两个的问题!
t2.start();test2 not only is a object, but also is a Thread.
Yan can synchronized a object, but you can't do it for Thread.
............
}
in the class test2,public synchronized void run(){
............
}如果你要notify()一个线程,那么这个线程的run()方法必须是同步的。
synchronized