Longand Integerare objects. Boxing / unboxing only works with primitives. Doing Long boxedLong = iit looks like Long boxedLong = new Integer(10)no no! Also, remember that between Longand Integerthere is no inheritance, so it’s Integer i = new Long()not even valid
ortis source
share