your code is quite confusing.taking too much time to understand,try to write indently along with comments explaining what you are doing or wants to do.
in your case you should use ArrayList<Integer> instead of ArrayList<String> and you have also gave wrong argument type to method setLocationCells give the argument as Arrays.asList(locations) to method or simply use ArrayList<Integer> instead of array.
Try to enjoy your work while doing it,it will Automatically convert in Hard Work...
Also never write == true or == false. Both are poor style and error‑prone; you might write = instead of == by mistake.
while (b == true) ... always
while (b) ... Never
while (b == false) ... always
while (!b) ...
And welcome again
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library