SHARE
TWEET

Untitled

a guest Dec 6th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class CounterPlus implements Runnable {
  2.    
  3.   private Counter counter;
  4.  
  5.   public CounterPlus(Counter counter) {
  6.     this.counter = counter;
  7.   }
  8.  
  9.   public void run() {
  10.  
  11.     for (int i = 0; i < 10; i++) {
  12.  
  13.     counter.inc1();
  14.     counter.inc2();
  15.     counter.inc1();
  16.     counter.inc2();
  17.  
  18.     }
  19.   }
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top