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; like a 3*3 image;
how to design a program to read integers into an integer array
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
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 : Two-Dimensional Arrays
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.