4. 请说出你所知道的线程同步的方法。 答:(1).同步代码块synchronized(object){ 代码段 }
(2)同步函数public synchronized void sale(){
//...}