今天做了一个试验:new Long(32).equals(new Long(32))。
这个表达式的返回值是false。为什么呢?这是JDK文档中的描述:
Compares this object to the specified object. The result is true if and only if the argument is not null and is a Long object that contains the same long value as this object.
是我做错了什么地方?还是JDK的问题?