add javagc document

This commit is contained in:
yunwei37
2023-06-03 03:25:04 +08:00
committed by 云微
parent 63c8be04c3
commit dea38b0d80
11 changed files with 664 additions and 202 deletions

View File

@@ -0,0 +1,15 @@
public class HelloWorld {
public static void main(String[] args) {
// loop and sleep for 1 second
while (true) {
System.out.println("Hello World!");
// create an object and let it go out of scope
Object obj = new Object();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}

View File

@@ -0,0 +1,3 @@
test:
javac HelloWorld.java
java HelloWorld