5336a08af2
Boxing a primitive using the constructor ("new Integer(4)") always creates a distinct new boxed instance. That's rarely what you need, and in fact all of those constructors have been deprecated in Java 9. Using the static "valueOf" method instead ("Integer.valueOf(4)") can give better performance by reusing existing instances. You no longer get a unique boxed object, but generally that's OK. |
||
---|---|---|
.. | ||
core/tests | ||
demandpa/driver | ||
examples | ||
util/io |