2019.4.23

    技术2022-07-11  78

    2019.4.23

    public synchronized void transfer(int from, int to, int amount) throws InterruptedException{ while(accounts[from] < amount) wait(); accounts[from] -= amount; accounts[to] += amount; notifyAll(); }

    Processed: 0.011, SQL: 9