Amazon Interview Question
Software Engineer / DevelopersCountry: United States
Interview Type: Phone Interview
Integer is an object class. Therefore when you make a variable type Integer, you have properties available to that variable; such as toString() and others. While int is the datatype that is made easier for programmer to use. In most of programming language, int is type 32 while Integer would be an object. So with int you won't get the same benefits as with Integer.
Please correct me on any mistake i may have made. of course there is more to say about this topic.
Assuming Java language
- Ganesh January 08, 2013Integer is a Class and int is a basic datatype