📄 multdimarraytypes.java
字号:
package examples.basic;
/** A class to demonstrate the initialization and
* use of multidimensional arrays
*/
public class MultDimArrayTypes {
/** The test method of the class
* @param args Not used
*/
public static void main( String[] args ) {
int[][] b;
b = new int[3][];
b[0] = new int[5];
b[1] = new int[7];
b[2] = new int[2];
b[0][4] = 1256;
int[][] c = new int [2][4];
c[0][1] = -6754;
int[][] d = { {-5,-6,8 },{-2,11,3456,5 },{7 } };
System.out.println( "b[0][4]=" + b[0][4] +
" c[0][1]=" + c[0][1] + " d[1][3]=" + d[1][3] );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -