Such a construct is likely erroneous, and will
throw a java.lang.ClassCastException
at runtime.
Example:
interface A {}
interface Z {}
static class C {}
void x(C c) {
if (c instanceof Z) {
A a = ((A)c); // cast to incompatible interface 'A'
}
}