What are wrapper classes?
Answers were Sorted based on User's Feedback
wrapper classes allow primitive data types to be accessed
as objects.Once assigned a value the value of wrapper
classes can't be changed.
Is This Answer Correct ? | 48 Yes | 10 No |
Answer / ravikiran
wreapper classes will allow the primitive types to act like
objects
Is This Answer Correct ? | 36 Yes | 6 No |
Answer / irshad ahmad
Wrapper classes are classes that are used to make primitive
data types into objects, and to make wrapped objects into
primitives because
As we know that vector in java can hold only object; but
can't directly store primitive data types, like int,float,
char, long, double. therefore we need to convert simple data
type to object. This can we done using wrapper classes.
Is This Answer Correct ? | 14 Yes | 0 No |
Answer / vijayakumar chinnasamy
Wrapper class : A class to enclosed(wrapped) the primitive
data type.
eg: Integer - it wrapp the int primitive data type.
Character - it wrap the chat data type.
int a=10;
Integer i=new Integer(a);
Java Wrapper class:
Integer,Byte,Short,Character,Boolean,Long,Float,Double.
Is This Answer Correct ? | 13 Yes | 5 No |
Answer / ritesh sinha
The java programing language provides wrapper classes to
manipulate primitive data elements as objects. such data
element are wrapped in an object created around them.
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / bhupendra vijay
Wrapper classes are those classes that allow primitive data
types as objects.
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / guest
The wrapper classes can take constructors of either the
type they are designed to wrap or of a String that can be
converted to that type. Thus the Integer class can take a
number that could be contained by an int, but an error will
occur if you try to pass a number with a floating point
component. Remember that the wrapper classes are just that
classes, they are not primitives and instances of the
wrappers can only be manipulated in the same way as any
class. You may get questions on the exam with code that
uses standard math operations to manipulate instances of
wrappers. You can of course use the + operator where it
would implicitly call the toString method, but as soon as
you see the - * or % operator, beware.
Is This Answer Correct ? | 7 Yes | 8 No |
Answer / adeel
wrapper classes are those who wrapped the primitives one for
sprcific purposes.
Is This Answer Correct ? | 4 Yes | 5 No |
Answer / priyanka
When we need to store primitive datatypes as objects, we use
wrapper classes.MEans in utility classes all the utility
classes stores Objects.So when we need to store a primitive
datatype.We make an object of theat primitive data and store it.
Thats why we use Wrapper classes in Java.
int is a primitive data type , where as Integer is a class
which encapsulates the primitive int data type and
represents in terms of object.
Is This Answer Correct ? | 3 Yes | 4 No |
Answer / prabhu.poddar
Wrapper class is a representation of the base class for a
set of data source. The java wrapper class dont comparises
the consractor all of the primitive wrapper class in java
are immetable.wrapper class in offers library intilazation
services as well as the access for to the data source
servicess that the wrapper class suports.
Is This Answer Correct ? | 0 Yes | 1 No |
How we can execute any code even before main method?
how can we import the user defined package without classpath?
Is array passed by reference in java?
What is the difference between Resultset and Rowset.
can we have function for truncating the sign as like abs in oracle.
Which is easier .net or java?
What is use of set in java?
What is sorting algorithm in java?
What are the advantages of java inner classes?
List the three steps for creating an object for a class?
What is jpa specification?
What is Unicast and Multicast object? Where we will use?
1 Answers Scope International,