Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TestArrayRekursion {
- public static void printArray (int [][] array) {
- for (int i=0; i<array.length; i++) {
- for (int j=0; j<Array.getLength(array[i]);j++){
- System.out.println("["+i+"] ["+array[i][j]+"]");
- }
- }
- }
- public static void main (String [] args) {
- int array [][] = new int [][] { {1,2,3}, {5,6,4},{3,4,3,212,2} };
- printArray (array);
- test (array);
- }
- public static void test (int [][] array) {
- Collections.reverse(Arrays.asList(array));
- printArray(array);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment