I am VERY confused as to why this dont work
I just started learning java and to show my so called skillz im gonna try and make a genetic algorithm and if you dont know what that is click here for a video explaining it. So im going to make an algorithm that learns to say the string "Hello World" but i get some errors and i cant fix. someone pls help.
Unlike in Python, variables are not global by default. Therefore, you need to initialize them in the scope of the class. Put this line in the same hierarchical level as the main and grabChar methods:
and instead of declaring it in main, just assign it:
chars = new ArrayList<String>();