We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a4fc7d commit d8f7a7bCopy full SHA for d8f7a7b
example/CH15/SomeThread.java
@@ -3,12 +3,14 @@
3
public class SomeThread implements Runnable {
4
public void run() {
5
System.out.println("sleep....至 blocked 狀態");
6
- try {
7
- Thread.sleep(9999);
8
- }
9
- catch(InterruptedException e) {
10
- System.out.println("I am interrupted....");
11
+ while(true) {
+ try {
+ Thread.sleep(9999);
+ }
+ catch(InterruptedException e) {
+ System.out.println("I am interrupted....");
12
13
14
}
15
16
public static void main(String[] args) {
0 commit comments