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 do you mean by collectors in java 8?

0 Answers  


What is the frontend and backedn in Java?

3 Answers   TCS,


What is hashmap and map?

0 Answers  


If try block is successfully executed, Then Is Finally block executed?

0 Answers   PUCIT,


Can we use different return types for methods when overridden?

0 Answers  






What is the importance of hashcode() and equals() methods?

0 Answers  


what is real-time example of runtime polymorphism and compile time polymorphism

4 Answers   SLK Group,


I have 2 objects inside one object(vector). how can i serialize one of them. I dont want to serialize the second one

3 Answers   ABC, L&T,


What are facelets templates?

0 Answers  


What is instance means in java?

0 Answers  


What is :: operator in java 8?

0 Answers  


What are legal modifiers that we can use to declare an inner class?

1 Answers   Infosys,


Categories