[Solved] Pass by Ref Java. Integer ins’t modified, Collection is modified, Why? [duplicate]


In short: primitive types and “Primitive wrappers (Integer, Long, Short, Double, Float, Character, Byte, Boolean)” can not be altered via reference.

Check http://en.wikipedia.org/wiki/Immutable_object for Details

5

solved Pass by Ref Java. Integer ins’t modified, Collection is modified, Why? [duplicate]