Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. class apples {
  2. public static void main(String args[]){
  3. int firstArray[][]={{8,9,10,11},{12,13,14,15}};
  4. int secondArray[][]={{30,31,32,33},{43},{4,5,6}};
  5.  
  6. System.out.println("This is the first Array");
  7. display(firstArray);
  8.  
  9. System.out.println("This is the second Array");
  10. display(secondArray);
  11.  
  12.  
  13. }
  14. public static void display(int x[][]){
  15. for (int row=0;row<x.length;row++){
  16. for(int column=0;column<x[row].length;column++){
  17. System.out.print(x[row][column]+"\t");
  18. }
  19. System.out.println();
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement