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

Explain java coding standards for interfaces?

0 Answers  


Objects or references which of them gets garbage collected?

0 Answers  


Explain inheritance in java?

0 Answers  


What is jar?

0 Answers  


Does java trim remove newline?

0 Answers  






How can we run a java program without making any object?

0 Answers  


What's the difference between comparison done by equals method and == operator?

0 Answers  


how to handle exceptions in core applications?

2 Answers   CSS,


How do you define a method?

0 Answers  


What is the collections api in java programming?

0 Answers  


How do you delete a list in java?

0 Answers  


How many ways can we create the string object?

0 Answers  


Categories