
question about 2d arrays
I am a new one of java;
I have a question about 2d array which is that
IF a 2d array is of size[3][3]; like a 3*3 image;
how to design a program to read integers into an integer array
like
1 2 3
4 5 6
7 8 9
if so, how to copy the array into a new array such that the image is like
3 2 1
6 5 4
9 8 7
or
987
654
321;
I am very confusing about that ,hope to get ideas from here,thank you;:(grin):

Have you actually tried anything for this?
See if this can help : TwoDimensional Arrays
Goldest

Take a piece of paper and write down the index for the source and the index for the target. Do it for all the numbers in the array.
Look at the relationship between each pair of numbers to see how to write a loop to do the copy.