mirror of
https://github.com/eunomia-bpf/bpf-developer-tutorial.git
synced 2026-06-30 17:06:37 +08:00
add javagc document
This commit is contained in:
15
src/15-javagc/tests/HelloWorld.java
Normal file
15
src/15-javagc/tests/HelloWorld.java
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
src/15-javagc/tests/Makefile
Normal file
3
src/15-javagc/tests/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
test:
|
||||
javac HelloWorld.java
|
||||
java HelloWorld
|
||||
Reference in New Issue
Block a user