求讲解 谢谢了
Question No: 5
interface MyInterface{}
public class MyInstanceTest implements MyInterface{
static String s;
public static void main(String args[]){
MyInstanceTest t = new MyInstanceTest();
if(t instanceof MyInterface){
System.out.println("I am true interface");
}else {
System.out.println("I am false interface");
}
if(s instanceof String){
System.out.println("I am true String");
}else {
System.out.println("I am false String");
}
}
}
A.compile time error
B.runtime error
C.prints: “I am true interface” followed by “I am true String”
D.prints: “I am true interface” followed by “I am false String”
E.prints: “I am false interface” followed by “I am false String”
F.prints: “I am false interface” followed by “I am true String”