Thread: 2D array
View Single Post
  #2 (permalink)  
Old 01-15-2008, 06:06 PM
ShoeNinja's Avatar
ShoeNinja ShoeNinja is offline
Senior Member
 
Join Date: Oct 2007
Posts: 112
ShoeNinja is on a distinguished road
Send a message via AIM to ShoeNinja
It seems like you just need a for loop.
Code:
for(int i = 0; i < array[0].length; i++){ //use array[0][i] //use array[1][i] }
The problem with this is that you have to ensure that your arrays are the same size.

I would look into using a HashMap. You can get an enumeration object from them and then use the value and key parameters to get the data that you need.
Reply With Quote