java stack Overfloq code example
Example 1: java stack overflow
class someClass{
public static void main(string[] args){
loop();
}
public static void loop(){
loop();
}
}
class someOtherClass{
public static void main(string[] args){
while(true){
Systen.out.println("STACKOVERFLOW");
}
}
}
class someOtherOtherClass{
public static void main(string[] args){
for (i = 1; i > 0; i++){
Systen.out.println("STACKOVERFLOW AGAIN");
}
}
}
Example 2: for loop in java stack overflow
for(counter=10;counter>=1;counter--){ System.out.println(counter); }