- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmulti_array.java
More file actions
Latest commit
22 lines (20 loc) · 626 Bytes
/
Copy pathmulti_array.java
File metadata and controls
22 lines (20 loc) · 626 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
packagecom.company;
publicclassmulti_array {
publicstaticvoidmain(String[] args) {
int[][] flats=newint[2][3];
flats[0][0]=100;
flats[0][1]=101;
flats[0][2]=102;
flats[1][0]=201;
flats[1][1]=202;
flats[1][2]=203;
System.out.println("Printing 2-D Array using for-loop");
for (inti = 0; i <flats.length ; i++) {
for (intj = 0; j <flats[i].length ; j++) {
System.out.print(flats[i][j]);
System.out.print(" ");
}
System.out.println();
}
}
}