![](https://lstatic.shangxueba.com/jiandati/h5/images/m_q_title.png)
[单选题]
类 Teacher 和 Student 是类 Person 的子类; Teacher t; Student s; // t and s are all non-null. if (t instanceof Person ){ s=(Student)t; } 最后一条语句的结果是:
A.将构造一个Student 对象;
B.表达式是合法的;
C.表达式是错误的;
D.编译时正确, 但运行时错误。
提问人:网友shanyu0521
发布时间:2022-01-07
A.将构造一个Student 对象;
B.表达式是合法的;
C.表达式是错误的;
D.编译时正确, 但运行时错误。
A、Go ahead
B、Hi, long time no see, Dick.
C、I’m Helen. Nice to meet you.
D、You're welcome.
A、West Side Story
B、My Fair Lady
C、The Sound of Music
D、Oliver!
A、10和20
B、20和10
C、10和10
D、20和20
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!