I have no idea why is this happenning, it seems to be in a constant loop between creating new object and initializing it
public class App {
Character hero = new Character();
charCreation charCreation = new charCreation();
public static void main(String [] args){
App app = new App();
app.run();
}
void run(){
charCreation.charCreate();
}
}
So here App creates a new charCreation object which is this
import java.util.Scanner;
class charCreation extends App {
Scanner skan = new Scanner(System.in);
protected void charCreate(){
......
And here's the error
Exception in thread "main" java.lang.StackOverflowError
at charCreation.(charCreation.java:3)
at App.(App.java:5)
at charCreation.(charCreation.java:3)
at App.(App.java:5)
......
it goes on and on
charCreationis anAppwhich contains acharCreationwhich is anAppetc, etc.