class Super { public int getLenght() { return 4; } } public class Sub extends Super { public long getLenght() { return 5; } public static void main(String[] args) {Super sooper = new Super(); Sub sub = new Sub(); System.out.println( sooper.getLenght() + “,” + sub.getLenght() ); } } What is the output? ()
- A、 4,4
- B、 4,5
- C、 5,4
- D、 5,5
- E、 Compilation fails.
正确答案:E
答案解析:有
微信扫一扫手机做题