+ 1

Differences between int and Integer

both of them had same meaning right? what is the differences? (p.s. sorry for bad english)

27th May 2017, 8:20 AM
Mohammad Rizal Rizwan
Mohammad Rizal Rizwan - avatar
6 Antworten
+ 4
int -- primitive type integer is an object
27th May 2017, 8:25 AM
MR Programmer
MR Programmer - avatar
+ 3
int is primitive data type whereas Integer is an object
27th May 2017, 8:56 AM
Player
Player - avatar
+ 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.
27th May 2017, 8:33 AM
Mukarram Pasha
Mukarram Pasha - avatar
+ 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
27th May 2017, 9:16 AM
Sulaiman Said Al-Mazruii
Sulaiman Said Al-Mazruii - avatar
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.
27th May 2017, 8:48 AM
Thanh Le
Thanh Le - avatar