I'm currently writing a console program that's split into many different tasks/methods. It roughly goes like this:
static void method1() {
//do something
method2();
}
static void method2() {
//do something
method3();
}
......
static void methodN() {
//doesn't get executed because there's a StackOverflow
}
My question is, does this lead to a StackOverflow eventually? There is no recursion and no infinite loop, just that every method runs the next method at the end to keep the program going.
If this is the reason why I get a StackOverflow, what can I change to prevent this?
Thanks in advance!