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 are the methods available in a class?
What is an example of a boolean?
How can we create objects if we make the constructor private ?
Is Java Class Threadsafe ????? How to make Java class Thread safe??
int a=1; float b=1.0; System.out.println(a==b);
13 Answers CTS, Honeywell, McAfee,
Is string thread safe in java?
Is java call by reference?
How to access a method that it declared as protected?
What is java in layman terms?
Can we override constructors in java?
Write a program to show whether a graph is a tree or not using adjacency matrix.
What do you mean by platform independence? What is an interface?