Campbell Ritchie wrote:Frogs don't sit on top of each other round here until the end of February at the earliest.
I presume you have a book to go with your teaching. Doesn't that say how to write a method? If not, try the Java™ Tutorials.
But before you write any more code, write down with pencil and paper what will happen to your xPos and yPos variables if I write something likeShow us what you wrote on your paper. Make sure to get a decent size eraser; you will need it.
Carey Brown wrote:I'm assuming that xInc would be a local int variable and would need to be declared. It is not a class variable is it?