This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
spotStatusWithCurrent and spotStatus are both int. Somehow, someway, spotStatus is being modified in the line I marked. Is there some little known pointer system in java? Have I been hallucinating for days and this isn't really happening? Have demons infested my computer after playing just a bit too much doom? But seriously, someone please help, I'm going crazy trying to figure out how this is possible.
they are both pointers to the same object. There is indeed a pointer system, although I'd question just how little-known it is. you have set both pointers to reference the same array. Change that array, both pointers still point to the modified object. I suggest just using a for loop to copy the array, but if you like methods with lots of parameters that you could just have easily written yourself, there's System.arraycopy. Oh, methods that don't follow conventions, tack that on too.
I've heard it takes forever to grow a woman from the ground