what is wrapper class and its uses?

Answers were Sorted based on User's Feedback



what is wrapper class and its uses?..

Answer / guru

wrapper class used access the primitive data types as objects.
we cant store primitive data in arraylist,hashtable so we
using wrapper class used to store primitive data types as
objects,caz objects only can store in collections

Is This Answer Correct ?    7 Yes 0 No

what is wrapper class and its uses?..

Answer / vijayakumar chinnasamy

A class enclosed or Wrapped the primitive data type is
called wrapper class.

Number class is the super class for Wrapper class. subclass
of Number classes are Byte,Short,Intger,Long,Float,Double,
Character

primitive values Wrapper class

byte Byte
short Short
int Integer
long Long
float Float
char Character

Mostly the wrapper classes are used to pass the date thru
networks/serializable.

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More Core Java Interview Questions

What is a class component?

0 Answers  


What is the purpose of using javap?

0 Answers  


Explain creating threads by implementing runnable class?

0 Answers  


What is the purpose of garbage collection in java?

0 Answers  


What is listnode in java?

0 Answers  


Explain difference between final, finally and finalize?

3 Answers   Cognizant,


What is 32 bit float?

0 Answers  


How many ways can we create the string object?

0 Answers  


What is object in java?

0 Answers  


What is a class in java?

0 Answers  


Is string a class?

0 Answers  


what is a static block?

4 Answers  


Categories