I'm not exactly sure why this causes a stack overflow. I know if I call the someMethod method without the instance it works fine, but I'd like to know why. Thanks
class test {
public static void main(String[] args) {
test item = new test();
item.someOtherMethod();
}
test item2 = new test();
void someOtherMethod() {
item2.someMethod();
}
void someMethod() {
System.out.println("print this");
}
}