I need to create a variable-sized two-dimensional coordinate system. What I've been able to come up with so far is:
Vector<Coordinate> board = new Vector();
for ( int count = 0; count < num_rows; count++ ) {
board.add(new Vector(num_cols));
}
How do I access the elements within this multi-dimensional vector? I have tried doing board[row][col]
but this didn't seem to work.
I'm familiar with using Vectors in C++, but can't seem to figure out how to do this in Java.