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
What is the syntax and characteristics of a lambda expression?
What is mean by exception?
What exactly is methodology?
Can a class be final?
Are arrays primitive data types?
What is the purpose of lambda expressions?
What is abstract class? Explain
Explain a few methods of overloading best practices in java?
Is there any difference between nested classes and inner classes?
What is an object’s lock and which object’s have locks?
What is api in java?
Differentiate between array list and vector in java.
How can we create an immutable class in java?
What is the Difference between Final Class && Abstract Class?
What is the difference between Grid and Gridbaglayout?