//this way u can print your array row by row
for (int i = 0; i < row; i++){
for (int j = 0; j < column; j++){
System.out.println(array[i][j]);
}
}
//this way u can print your array column by column
for (int i = 0; i < column; i++){
for (int j = 0; j < row; j++){
System.out.println(array[i][j]);
}
}
Syntax:
return_type [][]varible_name=new return_type[no_of_rows][no_of_columns];
int [][]a=new int[5][5];
Valid Declearation are following:
int [][]a=new int[5][5];
int []a[]=new int[5][5];
int [][]a[]=new int[5][5][5];