以下代码的执行结果是什么? public class Example { public static void main(String[] args) { Base b = new Base(); Subclass1 S1 = new Subclass1(); Subclass2 s2 = new Subclass2(); s1 = (Subclass1) s2; } } class Base { } class Subclass1 extends Base { } class Subclass2 extends Base { }
发布于 2020-12-25 22:05:55
登录后免费查看答案
关注者
0
被浏览
76