Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Deposito extends Thread{
- private RegionCritica cuenta;
- public Deposito(RegionCritica cont) {
- cuenta = cont;
- }
- @Override
- public void run() {
- try {
- sleep(50);
- double i = cuenta.GetContador();
- cuenta.setContador(i+300);
- System.out.println("--Deposito Exitoso--");
- System.out.println("Saldo actual : "+cuenta.GetContador());
- } catch (InterruptedException e) {
- System.out.println("ERROR DEPOSITO...");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement