Create Hell.java

This commit is contained in:
nora 2021-04-10 20:34:50 +02:00 committed by GitHub
parent 0b765ccd44
commit 23508111af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,19 @@
public class Hell {
public static void main(String[] args) {
boolean success = false;
while (!success) {
try {
var y = new long[100][100][100][100][100][100][100][100][100][100][100];
success = true;
} catch (OutOfMemoryError e) {
e.printStackTrace();
}
System.out.println("creation of massive long array failed. trying again...");
}
System.out.println("Sucess!");
}
}