首页 试题详情
单选题

已知: class Base { public Base(String s) { System.out.print(“B”); } } public class Derived extends Base { public Derived (String s) { System.out.print(“D”); } public static void main(String [] args) { new Derived (“C”); } } 那么结果为?

ABD

BDB

CC

D编译错误

正确答案:A (备注:此答案有误)

相似试题

  • 单选题

    已知class Base { public Base(String s) { System.out.print(“B”); } } public class Derived extends Base { public Derived (String s) { System.out.print(“D”); } public static void main(String [] args) { new Derived (“C”); } } 那么结果为?

    答案解析

  • 单选题

    有如下程序:#include using namespace std;class Base{protected:Base(){cout

    答案解析

  • 单选题

    The lower-level classes(known as subclasses or derived classes) ( )state andbehavior from the higher-level class(known as a super class or base class).

    答案解析

  • 单选题

    下面程序的运行结果是()。ImportnumpyasnpA=np.logspace(0,9,10,base=2)Print(A)

    答案解析

  • 单选题

    下面程序的运行结果是()。Import numpy as npA=np.logspace (0,9,10,base=2)Print (a)

    答案解析

热门题库