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 |
1).what is the difference between below examples String s="vijay"; String s=new String("vijay");
12 Answers Mascon, Satyam, TCS,
What is 3-tier model?
What state is a thread in when it is executing?
Does constructor return any value?
Which data type is class in java?
What is the use of a conditional inclusion statement in Java ?
What is the use of default method in interface in java? Explain
why not override thread to make a runnable? : Java thread
What is a serializable interface?
Why we cannot override static method?
What is garbage collection? What is the process that is responsible for doing that in java?
Does .length start 0 java?