|
superchunk said: get a variable it needs to be static OR since this variable inherently is dynamic, as the ship is moving, you need a public method called getX() and getY() that will return the current value of x and y. |
You are confusing static and constant. You can have static variables that change, of course.
My solution will work just fine. In fact, your suggestion was similar. Yes, the getX() and getY() have to be public to the class -- I simply assumed he'd write it that way (since writing things private is a little more advanced and a little more of a hassle, most beginning java programers skip it entirely ;)







