设计电脑生产类和搬运类

class Computer{ private int num=0;//定义默认电脑数量为零 public synchronized void SetNum(int num){//设置电脑数量 this.num=this.num+num; try{ Thread.sleep(700); }catch(InterruptedException e){e.printStackTrace();} } p
相关文章
相关标签/搜索