mirror of
https://github.com/Noratrieb/UselessClasses.git
synced 2026-01-14 16:45:09 +01:00
Create Hell.java
This commit is contained in:
parent
0b765ccd44
commit
23508111af
1 changed files with 19 additions and 0 deletions
19
src/main/java/com/github/nilstrieb/uselessclasses/Hell.java
Normal file
19
src/main/java/com/github/nilstrieb/uselessclasses/Hell.java
Normal 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!");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue