Comparison between the array should be used that Arrays.equals ()

In the tank, the comparison can not use the "==" between the array should be used that Arrays.equals () if the comparator array of native (i.e., the value of the array is one of several basic data types) can be used directly between the , we will take the initiative to call Object.equals () method if the basic data type value is not a native of the array, then re-use Arrays.equals () method. So if you define classes, equals methods need to rewrite the class.

Guess you like

Origin www.cnblogs.com/contixue/p/11545365.html