What are wrapper classes?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How java is similar to c?

583


Explain java coding standards for classes or java coding conventions for classes?

611


List implementations of list interface?

555


What are abstract methods in java?

645


Explain Basics of OOP Language in java

586






How finally used under exception handling?

507


Define locale.

586


Are registers volatile?

525


Explain about varargs in java?

576


Can private method static?

471


Differentiate between array list and vector in java.

628


In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?

829


Is void a wrapper class?

525


What is vector?

582


How can you make sure that your singleton class will always return single instance in multi-threaded environment?

566