why do we need wrapper classesit is sometimes


Why do we need wrapper classes?

It is sometimes simpler to deal with primitives as objects. Moreover most of the collection classes keep objects and not primitive data types. And also the wrapper classes give many utility methods also.

Because of these reasons we require wrapper classes. And since we make instances of these classes we can kept them in any of the collection classes and pass them around as a collection. Also we can pass them around as method parameters where a method expects an object.

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: why do we need wrapper classesit is sometimes
Reference No:- TGS0310986

Expected delivery within 24 Hours