multiarray.java
来自「有一个接口,用抽象类实现它的部分功能,再用实现类继承抽象类,实现其它没实现的接口」· Java 代码 · 共 25 行
JAVA
25 行
package cn.edu.csu.programmer;
public class MultiArray {
/**
* @param args
*/
public static void main(String[] args) {
int[][] x = new int[3][];
int[][][] y = new int[3][3][];
// x[0] = new int[1];
// x[1] = new int[2];
// x[2] = new int[3];
x[0] = new int[]{1};
x[1] = new int[]{2,3};
x[2] = new int[]{4,5,6};
for(int i = 0; i < x.length; i++){
for(int j = 0; j < x[i].length; j++){
System.out.println("x[" + i + "][" + j + "]= " + x[i][j]);
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?