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
How do you break a loop?
Does importing a package imports its sub-packages as well in java?
What all methods are used to prevent thread execution ?
Explain inheritance in java?
Can you instantiate the math class?
What is fail first in java?
Discuss about garbage collector in Java.
explain multi-threading in java?
What are the restrictions that are applied to the java static methods?
What is difference between fileinputstream and filereader in java?
What do you understand by the term wrapper classes?
Can a class be declared as static?
What is boolean in java?
What is a parameter in java?
What is t in generics in java?