A String is an Object too (well, everything except the primitive types is an Object in Java).
To use the Integer constructor that takes a String to need to cast the Object into a String:
Integer y = new Integer((String)obj);
Or, assuming that the Object is a String with a numeric value, it would be slightly more effective:
int y = Integer.parseInt((String)obj);