nimo frey wrote:Should I compare wrapper classes (Integer, Long, Short) via equals or via '==' ?
Via equals.
== only works for values between -128 and 127 (inclusive) for Byte, Short, Integer and Long, and for values between 0 and 127 for Character. And only if the object was retrieved using the static valueOf(primitive) method. Otherwise, a new object is created and == will return false.