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 dynamic binding(late binding)?
What is the difference between the size and capacity of a vector?
How do you clear an arraylist in java?
What is a variable simple definition?
What is a method type?
Enlist diffrent types of inheritance supported by java?
Can we override the private methods?
When will we use them?
Why java uses the concept of the string literal?
Define iterator and methods in iterator?
How do I remove a character from a string in java?
What is the difference between an interface and an abstract class?
What all access modifiers are allowed for top class ?
Is there any difference between nested classes and inner classes?
What is concurrent hashmap and its features?