I\'ve been trying to initialize an array and then test its values with a class method. I have initialized the array and have already tested it successfully within the constr
In the constructor you initialize an array boolean[]. The array is only visible in the constructor. If you want to use the array of the class, then replace
boolean[] grid = new boolean[sides];
with
grid = new boolean[sides];
. Then you use the array of the class, not of the constructor.