I have an infinite recursive cycle in Java
public void infiniteLoop(Long x){
System.out.println(""+x);
infiniteLoop(x + 1);
}
public static void main(String[] args) {
StackOverFlow st = new StackOverFlow();
st.infiniteLoop(0L);
}
In this snippet of code that shows a StackOverFlow error as expected, but if I look at the output of the console the error is shown in several lines:
My question is, why does this happen? Should not it stop as soon as the first stack overflow error is displayed?