Advertisement
jac_usai

Untitled

Jun 11th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. public class ProducerConsumerTest {  public static void main(String args[]) {
  2. List<Integer> bufferCondiviso = new LinkedList<Integer>();  int size = 4;
  3.  
  4. Thread prodThread = new Thread(new Producer(bufferCondiviso, size), "Producer");  Thread consThread = new Thread(new Consumer(bufferCondiviso, size), "Consumer");
  5.  
  6. prodThread.start();  consThread.start();
  7. }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement