forked from txs72/JavaTutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrintNum.java
More file actions
executable file
·83 lines (81 loc) · 1.38 KB
/
PrintNum.java
File metadata and controls
executable file
·83 lines (81 loc) · 1.38 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* */ package ch32;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ class PrintNum
/* */ implements Runnable
/* */ {
/* */ private int lastNum;
/* */
/* */ public PrintNum(int n) {
/* 56 */ this.lastNum = n;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */ public void run() {
/* 64 */ Thread thread4 = new Thread(new PrintChar('c', 40));
/* 65 */ thread4.start();
/* */ try {
/* 67 */ for (int i = 1; i <= this.lastNum; i++) {
/* 68 */ System.out.print(" " + i);
/* 69 */ if (i == 2) thread4.join();
/* 70 */ if (i >= 50) {
/* 71 */ Thread.sleep(1L);
/* */ }
/* */ }
/* */
/* 75 */ } catch (InterruptedException interruptedException) {}
/* */ }
/* */ }
/* Location: /Volumes/TXS.128G/hope useful/practice/2020.jar!/ch32/PrintNum.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/