double array

hi, i have a 2d array int [] [] IDAndNumber as a parameter :public void updateDetails(int [] [] IDAndNumber){//code here}in the code above, i need to be able to get the persons ID from the array and their number, how can i do this?
[273 byte] By [johnjohn] at [2007-11-26 12:16:26]
# 1
Your question makes no sense.
sabre150 at 2007-7-7 14:52:27 > top of Java-index,Archived Forums,Socket Programming...
# 2
And how are u storing ur data in the 2D array...?I think single dimensional would be fine
SidGate at 2007-7-7 14:52:27 > top of Java-index,Archived Forums,Socket Programming...
# 3

When posting code, please use code tags next time (see: http://forum.java.sun.com/help.jspa?sec=formatting).

public void updateDetails(int[][] IDAndNumber) {

for(int r = 0; r < IDAndNumber.length; r++) {

int[] row = IDAndNumber[r];

// do something with each row

}

}

prometheuzz at 2007-7-7 14:52:27 > top of Java-index,Archived Forums,Socket Programming...
# 4
> And how are u storing ur data in the 2D array...?> I think single dimensional would be fineWithout knowing how the two dimentional array represents his data I don't think you can say this!
sabre150 at 2007-7-7 14:52:27 > top of Java-index,Archived Forums,Socket Programming...
# 5

> > And how are u storing ur data in the 2D array...?

> > I think single dimensional would be fine

>

> Without knowing how the two dimentional array

> represents his data I don't think you can say this!

If I peer into my crystal ball, I can see hist data structure looks like this:

int[][] array = {

{1, 11},

{2, 22},

{3, 33}

};

where 1,2 and 3 are ID's and 11, 22 and 33 are his numbers.

prometheuzz at 2007-7-7 14:52:27 > top of Java-index,Archived Forums,Socket Programming...
# 6
> If I peer into my crystal ball, I can see hist data> structure looks like this::-) Looks like your crystal ball needs a good clean! It seems to be covered in snot!
sabre150 at 2007-7-7 14:52:27 > top of Java-index,Archived Forums,Socket Programming...
# 7

> > And how are u storing ur data in the 2D array...?

> > I think single dimensional would be fine

>

> Without knowing how the two dimentional array

> represents his data I don't think you can say this!

oops !! my mistake... I thought there is unique number per ID

SidGate at 2007-7-7 14:52:27 > top of Java-index,Archived Forums,Socket Programming...
# 8
> :-) Looks like your crystal ball needs a good clean!> It seems to be covered in snot!Impossible. Jos said it was working fine!
prometheuzz at 2007-7-7 14:52:27 > top of Java-index,Archived Forums,Socket Programming...
# 9
> > :-) Looks like your crystal ball needs a good> clean!> > It seems to be covered in snot!> > Impossible. Jos said it was working fine!:-)
sabre150 at 2007-7-7 14:52:27 > top of Java-index,Archived Forums,Socket Programming...