> Yeah, of course it was a typo in the first message.
>
Well how would I know this?
> The error I have is Eclipse telling me that Object
> can't be cast to Integer.
>
Eclipse is lying. Or you have another typo you haven't shown. Or are doing something else.
public class Test{
public static void main(String[] args){
Object o = new Integer(42);
Integer i = (Integer) o;
}
}
Compiles just fine.