Chapter 8Managing Concurrent Code Execution
- How many times does the following code print
How rude!
at runtime?public class Speaking {
void talk() {
try {
Thread.sleep(10_000);
} catch (InterruptedException e) {
System.out.println("How rude!");
} }
public static void main(String[] args) {
var s = new ...
Get OCP Oracle Certified Professional Java SE 17 Developer Practice Tests now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.