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 the difference between a break statement and a continue statement?

810


Convert a BST into a DLL and DLL to BST in place.

875


What is the purpose of skeleton and stub?

819


What is structure of java heap? What is perm gen space in heap?

776


What is anonymous inner class?

821


How is it possible in java programming for two string objects with identical values not to be equal under the == operator?

780


How do you check if an arraylist is not empty?

794


How do you input a string in java?

744


Explain the features of java?

791


Explain the inheritance?

768


what is the purpose of "virtual"?

801


Is java a super set of javascript?

833


What are the four corner stones of oop?

782


'A class is a template for an object' explain this statement.

751


What is constructor chaining in java?

829