6黑马币
最佳答案//账户类 public class Acount { private int money; public Acount(int money){ this.money=money; } public synchronized void getMoney(int money){ while(this.money10000){ try{ System.out.println("余额:"+this.money+"存款:"+money+" 该帐户最多存款10000 等待取款...");wait();}catch(Exception e){} }*/ try{ Thread.sleep(10);}catch(Exception e){} this.money=this.money+money; System.out.pri ...
| |
| |