SHARE
TWEET

Untitled

a guest Sep 20th, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package br.com.threadsjava;
  2.  
  3. /**
  4.  *
  5.  * @author giuliana.bezerra
  6.  *
  7.  */
  8. public class Counter {
  9.  public static void main(String args[]) {
  10.   CounterTask task = new CounterTask();
  11.   Thread counter1 = new Thread(task);
  12.   Thread counter2 = new Thread(task);
  13.   Thread counter3 = new Thread(task);
  14.   Thread counter4 = new Thread(task);
  15.   counter1.start();
  16.   counter2.start();
  17.   counter3.start();
  18.   counter4.start();
  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