Difference between int and Integer in Java. (Phone screen question)
Anoniem
int is a primitive type value and a variable declared as int type is immutable where is Integer on the other hand belongs to Object class and we can call methods on a variable of Integer type. eg: int i; Integer j; String s = i.toString(); //fails String s = j.toString(); //works