Question: what is difference between int and object?
Answer: int is a primitive type and Integer is a class type (which is kind of reference type). Primitive values do not share state with other primitive values. A variable whose type is a primitive type always holds a primitive value of that type. An object is a dynamically created class instance or an array.