Using new Double(double) is guaranteed to always result in a new
object whereas Double.valueOf(double) allows caching of values to be
done by the compiler, class library, or JVM. Using of cached values
avoids object allocation and the code will be faster. Unless the class
must be compatible with JVMs predating Java 1.5, use either autoboxing
or the valueOf() method when creating instances of Double and Float.

这个是文档里讲的,意思大概如下:

采用 new Double(double)会产生一个新的对象,采用 Double.valueOf(double)在编译的时候
可能通过缓存经常请求的值来显著提高空间和时间性能。