What is the difference between Integer and int?
Answer Posted / janet
Integer is a class defined in the java.lang package,where
as int is a primitive data tyep defined in the java
language itself.Java doesn't automatically convert from one
to the other.
Integer can be used as an argument for a method that
requires an object,where as int can be used for
calculations.
| Is This Answer Correct ? | 59 Yes | 9 No |
Post New Answer View All Answers
Is array dynamic in java?
What is the purpose of a volatile variable?
What is the final access modifier in java?
How many types of gc are there in java?
Why to use nested classes in java?
What is void in java?
How does hashset works in java?
Explain runtime exceptions?
What is a nested list?
Can you create an object of an abstract class?
How can we create objects if we make the constructor private ?
What are the concepts of 'OOPS'?
If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?
Which java ide is used the most?
What is the tradeoff between using an unordered array versus an ordered array?