I am confused between these three codes
int a = 5;
int b = 6;
int c = 5;
and
Integer x = new Integer(5);
Integer y = new Integer(6);
Integer z = new Integer(5);
and
Integer i = 5;
Integer j = 6;
Integer k = 5;
I know that the first one are some variables that contain values and the second one are some variables reference to some different objects, but what is the third one? I know that they are reference data types.
But I can't understand why and how many objects created... if any!