6.3.3 using two-dimensional arrays
- 3 outputs a write code for row 4 and all matrix elements are zero.
public class Demo {
public static void main(String[] args) {
int a[][]=new int[3][4];
for(int i=0;i<a.length;i++) {
for(int j=0;j<a[i].length;j++) {
System.out.print(a[i][j]);
}
System.out.println();
}
}
}
result
Note : After the array is declared as an array elements and complete allocate space for the array elements must be initialized ( initialization is first assigned mean values ) only after the use of array elements. If no initialization of array elements, the array elements also have default values, the default value table array element types shown in FIG.