package com
.liming
.array
;
public class ArrayTest {
public static void main(String
[] args
) {
int[] aa1
= {123,123,123,123};
String
[] ss1
= {"abc","abc","abc"};
int[] aa2
= new int[]{123,123,123,123};
String
[] ss2
= new String[]{"abc","abc","abc"};
int[] aa3
= new int[3];
int[] aa33
= new int[0];
int[] aa4
= {};
int[] aa44
= null
;
String
[][] ss5
= {new String[]{},new String[]{}};
String
[][] ss55
= {{},{}};
String
[][] ss555
= {null
,null
};
String
[][] ss5555
= {new String[5],new String[5]};
String
[][] ss6
= {new String[]{"def","def","def"},new String[]{"abc","abc","abc"}};
String
[][] ss66
= {new String[3],new String[3]};
ss66
[0][1] = "Hello,World";
String
[][] ss7
= new String[3][3];
ss7
[0] = new String[]{};
ss7
[1] = new String[]{"qwe","rty","zxc","kkk","jjj"};
ss7
[2] = new String[]{"abc","def","hij"};
ss7
[2][2] = "Hell Door";
String
[][][] ss8
= new String[4][3][3];
ss8
[0] = new String[][]{};
ss8
[1] = new String[3][3];
ss8
[2] = new String[][]{new String[2],new String[2],new String[2]};
ss8
[2][1] = new String[]{"abc","abc","abc"};
ss8
[3] = new String[][]{new String[]{"aaa","bbb","ccc"},new String[]{"ddd","eee","fff"}};
String
[][][][] ss9
= new String[][][][]{};
String
[][][][] ss99
= new String[][][][]{new String[][][]{new String[][]{new String[]{"Helo"}}}};
String
[][][][] ss999
= new String[4][4][4][4];
ss999
[0] = new String[][][]{new String[][]{new String[]{"这是什么鬼"}}};
ss999
[1] = new String[3][3][3];
ss999
[1][2][2][2] = "四维数组的演示";
System
.out
.println(ss999
[1][2][2][2]);
}
}
转载请注明原文地址: https://yun.8miu.com/read-20010.html