Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class apples {
- public static void main(String[] args) {
- int array_one[][] = {{8,9,10,11},{12,13,14,15}};
- int array_two[][] = {{30,31,32,33},{43},{4,5,6}};
- System.out.println("This is the first array");
- display(array_one);
- System.out.println("This is the second array");
- display(array_two);
- }
- public static void display(int x[][]){
- for(int row = 0; row < x.length; row++){
- for(int col = 0; col < x[row].length; col++){
- System.out.print(x[row][col]+"\t");
- }
- System.out.println();
- }
- }
- }
Add Comment
Please, Sign In to add comment