2020-09-29

Java Exception in thread "main" java.lang.StackOverflowError in main method

public static void main(String[] args) {
     TestList t = new TestList();
}
public class TestList extends ArrayList<Test{
     protected TestList test1;
     public TestList() {
          test1 = new TestList();
     }
}

I'm really confused - I tried running the file with the main method in it, and I get a StackOverflowError everytime I run it: at project.TestList.(TestList.java:9)



from Recent Questions - Stack Overflow https://ift.tt/3mXEEmB
https://ift.tt/eA8V8J

No comments:

Post a Comment