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 significance of listiterator?
Write java program to reverse string without using api?
How can you traverse a linked list in java?
What are three types of loops in java?
How to create com object in Java?
Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.
What is an immutable object? How do you create one in java?
Why is the main method static?
How concurrent hashmap works?
Can we increase size of array?
What is a arraylist in java?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
When the constructor of a class is invoked?
Which software is used for java programming?
What are the properties of thread?