When to use wrapper class and primitive type

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. Many … Read more

What is a wrapper class?

In general, a wrapper class is any class which “wraps” or “encapsulates” the functionality of another class or component. These are useful by providing a level of abstraction from the implementation of the underlying class or component; for example, wrapper classes that wrap COM components can manage the process of invoking the COM component without … Read more