Separating into Tech and SysDev

This commit is contained in:
2022-05-07 23:24:08 +02:00
parent ae93dfdacb
commit e49df859aa
88 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/*
* Run this code.
* 1: What happens ?
* 2: Why does it happen ?
*
* Code courtesy of www.csc.villanova.edu/~mdamian/threads/javamonitors.html
*/
public class PC {
public static void main(String[] args) {
Buffer b = new Buffer(4);
Producer p = new Producer(b);
Consumer c = new Consumer(b);
p.start();
c.start();
try {
p.join();
c.join();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("End");
}
}