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
Define nashorn in java8.
make a method which any number and any type of argument and print sum of that arguments.....
Which method you will use to create a new file to store some log data. Each time a new log entry is necessary, write string to the file in java ?
What is an association?
Is zero a natural number?
Differentiate between == and equals().
How can constructor chaining be done using this keyword?
Does sprintf add a null terminator?
How we can skip finally block of exception even if some exception occurs in the exception block in java?
What is stored procedure. How do you create stored procedure ?
how to create multithreaded program? : Java thread
How to sort elements in a parallel array in java?
What is difference between iterator and enumeration in java?
Give a practical example of singleton class usage?
Can we have try block without catch block?