What are wrapper classes?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the base class of all exception classes?

577


what is meant wrapper classes?

600


How concurrent hashmap works?

605


Explain hashset and its features?

572


What is finalize()?

601






Explain the Propertie sof class?

584


Explain the difference between private, public, package and protected in java?

593


Is array passed by reference in java?

575


Can we use both this () and super () in a constructor?

545


What is a percentage sign called?

615


what is encapsulation in java? Explain

659


What is method in research paper?

569


How many types of parsers are there?

540


Can a lock be acquired on a class in java programming?

529


Why declare Main() inside the class in java ?

606