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

Can we execute a program without main() method?

533


Why java is called not pure object oriented language?

581


Variables used in a switch statement can be used with which datatypes?

517


What is synchronization and why is it important in java programming?

469


What is variable explain with example?

570






Where are register variables stored?

592


What is functional interface in java example?

537


Write a program based on Java script program.

649


What is assembly condition codes?

558


What are the uses of java?

570


What is difference between identifier and variable?

471


What is immutable class in java?

512


How many types of constructors are used in java?

541


What is difference between class and object in java?

528


What is arguments in java?

523