What is a Wrapper class?
Answers were Sorted based on User's Feedback
Answer / muhammad taahaa
to store primite data type as objects....
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / rakesh
It is sometimes easier to deal with primitives as objects.
Moreover most of the collection classes store objects and
not primitive data types. And also the wrapper classes
provide many utility methods also. Because of these resons
we need wrapper classes. And since we create instances of
these classes we can store them in any of the collection
classes and pass them around as a collection. Also we can
pass them around as method parameters where a method expects
an object.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rajat dubey
Wrapper classes allow
primitive data types to
be accessed as
objects.They are one
per primitive
type:Boolean,Byte,Character,Double,Float,Integer,Long
and Short.Wrapper
classes make the
primitive type data to
act as objects.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is a copy constructor in java?
What are user defined exceptions?
Is there a way to increase the size of an array after its declaration?
How does serialization work
What is the reason that multiple inheritance is not possible in java??
How do you sort arrays in java?
What is consumer in java?
What happens if an exception is not handled in a program?
What does the three dot emoji mean?
How many tetrahedral voids are there in bcc?
What is Hash Code in Java?
Is null or empty java?