试题详情
单项选择题 现有:  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
  • 关注下方微信公众号,在线模考后查看

热门试题