if( account[from] < amount )
{ System.out.println( "Account: " + from + " has less than " + amount );
}
while( account[from] < amount )
{ try
{ wait();
}
catch( InterruptedException e ) {}
}
account[from] -= amount;
account[to] += amount;
noTransacts += 1;
if( noTransacts%1000 == 0 )
{ currentState();
}
notifyAll();