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
Can we write class inside a class in java?
Does constructor return any value?
What is module in oop?
What are the 4 versions of java?
What is a parameter in a function?
What are the advantages of encapsulation in java?
What is the difference between arraylist and hashset in java?
What is a modifier?
What is mean by encoding?
What is a super method?
Are arrays primitive data types?
Explain the public class modifier?
When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?
what is the difference between process and thread? : Java thread
Is string a class in java?