what is the difference between int and integer?
A Java both int and Integer are used to store integer type data the major difference between both is type of int is primitive while Integer is of class type. ... A int is a data type that stores 32 bit signed two's compliment integer. On other hand Integer is a wrapper class which wraps a primitive type int into an object.