Results 1 to 2 of 2
Thread: Help with 2D Arrays.
- 03-30-2010, 01:55 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 78
- Rep Power
- 0
Help with 2D Arrays.
Im going to have two seprate 2D arrays. I know how to add the rows of a 2d array and i know how to add the columns of a 2d array, but i dont know how to do this.
There are TWO 2D Arrays. I need to add the index of the first 2d array with the same index of the other 2d array, etc. for example:
1 2 3
1 2 3
1 2 3
+
1 1 1
1 1 1
1 1 1
=
2 3 4
2 3 4
2 3 4
but i have no clue!
- 03-30-2010, 02:27 AM #2
Use nested loops, with a loop over the rows and an inner loop over columns. Access the array entries using the indexes.
The Java Tutorial. Read it.
Similar Threads
-
Arrays.sort... why sorting all arrays in class?
By innspiron in forum New To JavaReplies: 6Last Post: 03-23-2010, 01:40 AM -
Arrays
By HosHos in forum New To JavaReplies: 3Last Post: 08-14-2009, 04:23 AM -
Please help me with arrays!
By ddrcan in forum New To JavaReplies: 2Last Post: 08-10-2009, 04:30 PM -
Help with arrays!
By lilac87 in forum New To JavaReplies: 2Last Post: 07-28-2009, 04:57 AM -
Need help with 2D arrays...
By rrsv2 in forum New To JavaReplies: 3Last Post: 11-30-2008, 03:15 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks