What is a Wrapper class?

Answer Posted / praveen

Say supposing there is a requirement to store only the
object in an array A.The Primitive types cannot be stored in
the same array as the array can accommodate only Objects
here is where Wrapper Class come into picture.ie, we create
wrapper for the primitive types.One such example is as below

Ex:int i;
Wrapper class for the primitive type(int) is created as below:

INTEGER i = new INTEGER();

Is This Answer Correct ?    58 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is abstract class constructor called?

552


Is null an object java?

524


What is re-factoring in software?

566


Explain the differences between static and dynamic variables?

568


Where import statement is used in a java program?

600






What are the approaches that you will follow for making a program very efficient?

630


What is ‘has a’’ relationship in java?

709


What are the types of collections in java?

529


Can we increase size of array?

555


What differences exist between iterator and listiterator?

556


What is Java Package and which package is imported by default?

582


How to implement an arraylist in java?

494


What are the drawbacks for singleton class?

507


Can an anonymous class be declared as implementing an interface and extending a class in java programming?

631


What is a substitution variable?

547