Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement