现有: class Bird { void talk() { System.out.print("chirp "); } } class Parrot2 extends Bird { protected void talk() { System.out.print("hello "); public static void main(String [] args) { Bird [] birds = {new Bird(), new Parrot2 () }; for( Bird b : birds) b.talk () ; } } 结果是什么 ?()
- A、 chirp chirp
- B、 hello hello
- C、 chirp hello
- D、编译错误
正确答案:C
答案解析:有

微信扫一扫手机做题