- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClimate.java
More file actions
Latest commit
28 lines (19 loc) · 580 Bytes
/
Copy pathClimate.java
File metadata and controls
28 lines (19 loc) · 580 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
importjava.io.*;
publicclassClimate {
publicstaticvoidmain(String[] args) {
Temperaturetemperature = newTemperature();
Consumerconsumer = newConsumer();
temperature.tProdtemp.start();
consumer.tConmin.start();
try {
temperature.tProdtemp.join();
} catch (InterruptedExceptione) {
e.printStackTrace();
}
try {
consumer.tConmin.join();
} catch (InterruptedExceptione) {
e.printStackTrace();
}
}
}