根据类的
javadoc
Every array also belongs to a class that is reflected as a Class
object that is shared by all arrays with the same element type and
number of dimensions.
但是当我跑下面的时候
int[] intArray = { 1,2 }; out.println(intArray.getClass().hashCode()); int[] int2Array = { 1,2 }; out.println(int2Array.getClass().hashCode()); out.println(intArray.equals(int2Array));@H_404_11@我得到以下输出
1641745 1641745 false@H_404_11@我想知道为什么equals返回false,即使这两个数组都是int类型并具有相同的维度.