int startInt = 123; // Start Integer
Object objectInt = startInt; // Convert Integer to object
if(objectInt instanceof Integer) { // Check if object is Integer
int endInt = (int) objectInt; // Convert object to Integer
}
int startInt = 12;
Object startObject = startInt;
if(startInt instanceof int) {
int endInt = (int) startInt; // Object is int.
} else {
// Object is not int.
}