public class Test {
public static void main(String[] args) {
int[] a1=new int[3];
int[] a2=new int[4];
int[][] a3=new int[2][3];
String[] a4=new String[3];
System.out.println(a1.getClass()== a2.getClass());//true
System.out.println(a1.getClass()== a4.getClass());//false
System.out.println(a1.getClass()== a3.getClass());//false
System.out.println(a1.getClass().getName());//[I
}
}
为什么会报错???? |
|