class Scratch 
{ 
    interface Interface<T>{} 
    class InterfaceImpl implements Interface<Object>{} 
    static class StaticInterfaceImpl implements Interface<Object>{} 

    public void compiles_with_unchecked_cast_warning( Interface<Object> list ) 
    { 
        InterfaceImpl classA = (InterfaceImpl)list; 
    } 

    public static void compiles_with_no_warnings( Interface<Object> list ) 
    { 
        StaticInterfaceImpl classA = (StaticInterfaceImpl)list; 
    } 
} 