When to use wrapper class and primitive type
问题 When I should go for wrapper class over primitive types? Or On what circumstance I should choose between wrapper / Primitive types? 回答1: Others have mentioned that certain constructs such as Collections require objects and that objects have more overhead than their primitive counterparts (memory & boxing). Another consideration is: It can be handy to initialize Objects to null or send null parameters into a method/constructor to indicate state or function. This can't be done with primitives.