Alright guys bear with me for a moment, I'm trying to create an array than when I call it out using System.out.println( "("+LocationX+ "," +LocationY+")" ); it prints for me all the current objects (which in this case is the rocks) location in X and Y format.
Here's my code:
I know the code is wrong but what can I do to make it work?
public class Rock extends Objects { int LocationX[] = {0}; int LocationY[] = {0}; public void act() { rockPosition(); rocksRecord(); } public void rockPosition() { int x = getX(); int y = getY(); int LocationX[]; int LocationY[]; } public void rocksRecord() { System.out.println( "("+Lx[i]+ "," +Ly[i]+")" ); } }