+ 1
Differences between int and Integer
both of them had same meaning right? what is the differences? (p.s. sorry for bad english)
6 Antworten
+ 4
int -- primitive type
integer is an object
+ 3
int is primitive data type whereas Integer is an object
+ 2
int is simply a primitive data type. whereas Integer is a class which returns an object and allows you to call methods on that object.
+ 1
Int is datatype for numeric values but integer is datatype for an object, like u wanna declare for a picture, so u will use integer datatype but not int
0
int is the primitive data value
Integer is the wrapper class for int. With the class you can then manipulate the int value, e.g. parsing int to another value.