I\'m basically refining, completing and trying to compile a test code from a reference book for java beginners. The objective is to create a guessing game wherein the target
Remove the public keyword from int[] locations={1,2,3};. An access modifier isn't allowed inside a method, as its accessbility is defined by its method scope.
If your goal is to use this reference in many a method, you might want to move the declaration outside the method.