What are wrapper classes?

Answers were Sorted based on User's Feedback



What are wrapper classes?..

Answer / niranjanravi

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

What are wrapper classes?..

Answer / ravikiran

wreapper classes will allow the primitive types to act like
objects

Is This Answer Correct ?    36 Yes 6 No

What are wrapper classes?..

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

What are wrapper classes?..

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

What are wrapper classes?..

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

What are wrapper classes?..

Answer / bhupendra vijay

Wrapper classes are those classes that allow primitive data
types as objects.

Is This Answer Correct ?    3 Yes 2 No

What are wrapper classes?..

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

What are wrapper classes?..

Answer / adeel

wrapper classes are those who wrapped the primitives one for
sprcific purposes.

Is This Answer Correct ?    4 Yes 5 No

What are wrapper classes?..

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

What are wrapper classes?..

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

Post New Answer

More Core Java Interview Questions

Is Java a dying language?

0 Answers  


Is null false in java?

0 Answers  


How to do validation of the fields in any project ?

2 Answers  


How finally used under exception handling?

0 Answers  


What is adapter in java?

0 Answers  






What is anagram of a string?

0 Answers  


How OOPS concept is achieved in Java?

6 Answers   Cognizant, JPMorgan Chase, Xavient,


Which is the class in java?

0 Answers  


what is hashmap& hashtable with example?

1 Answers   CTS,


Hi am an mca graduate . i have done bsc maths in my degree . every company asks me why you make shift from maths group to computere field . What i need to answer?

2 Answers  


Is space a string in java?

0 Answers  


What is the difference between error and exception and explain in simple words not whatever is given in the book.

7 Answers  


Categories