单选题

假定Base b = new Derived() 调用执行b.methodOne()后,输出结果是什么?

发布于 2022-03-03 14:09:32

假定Base b = new Derived() 调用执行b.methodOne()后,输出结果是什么?
public class Base
{
   public void methodOne()
   {
      System.out.print("A")
      methodTwo()
   }

   public void methodTwo()
   {
      System.out.print("B")
   }
}

public class Derived extends Base
{
   public void methodOne()
   {
      super.methodOne()
      System.out.print("C")
   }

   public void methodTwo()
   {
      super.methodTwo()
      System.out.print("D")
   }
}



登录后免费查看答案
关注者
0
被浏览
17
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看