have you ever programmed before then (int) is one of the primitive types you can set for your variables (just like char, float, ...).
but Integer is a wrapper class that you can use it to do some functions on an int variable (e.g convert it to string or vise versa,...) , but keep note that methods in the wrapper classes are static so you can use them anytime without creating an instance of Integer class. as a recap :
int x;
Integer y;
x and y are both variables of type int but y is wrapped by an Integer class and has several methods that you use,but i case you need to call some functions of Integer wrapper class you can do it simply.
Integer.toString(x);
but be aware that both x and y are corect but if you want to use them just as a primitive type, use the simple form (used for defining x).