Although this might be intended, such a construct is most likely an error, and will
result in 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'
}
}