-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRuntimeTest.java
More file actions
34 lines (29 loc) · 897 Bytes
/
RuntimeTest.java
File metadata and controls
34 lines (29 loc) · 897 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
29
30
31
32
33
34
package classLoader.runtime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
/**
* Created by Edwin Xu on 8/8/2020 11:11 AM
*/
public class RuntimeTest {
public static void main(String[] args) {
// Runtime runtime = Runtime.getRuntime();
// System.out.println(runtime.toString());
// System.out.println(runtime.freeMemory());
// Hashtable
for (int i = 0; i <10 ; i++) {
new Thread(new Runnable() {
@Override
public void run() {
while (true){
System.out.println(Thread.currentThread().getName());
try {
Thread.sleep(1000);
}catch (Exception e){
}
}
}
}).start();
}
}
}