itgle.com

1.publicclassEmployee{2.Stringname;3.doublebaseSalary;4.Employee(Stringname,doublebaseSalary){5.this.name=name;6.this.baseSalary=baseSalary;7.}8.}And:1.publicclassSalespersonextendsEmployee{2.doublecommission;3.publicSalesperson(Stringname,doublebaseSalar

题目

1.publicclassEmployee{2.Stringname;3.doublebaseSalary;4.Employee(Stringname,doublebaseSalary){5.this.name=name;6.this.baseSalary=baseSalary;7.}8.}And:1.publicclassSalespersonextendsEmployee{2.doublecommission;3.publicSalesperson(Stringname,doublebaseSalary,4.doublecommission){5.//insertcodehere6.}7.}Whichcode,insertedatline7,completestheSalespersonconstructor?()

A.this.commission=commission;

B.superb();commission=commission;

C.this.commission=commission;superb();

D.super(name,baseSalary);this.commission=commission;

E.super();this.commission=commission;

F.this.commission=commission;super(name,baseSalary);


相似考题
参考答案和解析
参考答案:D
更多“publicclassEmployee{2.Stringname;3.doublebaseSalary;4.Employee(Stringname,doublebaseSala ”相关问题
  • 第1题:

    Whichgetsthenameoftheparentdirectoryfile“file.txt”?()

    A.Stringname=File.getParentName(“file.txt”);

    B.Stringname=(newFile(“file.txt”)).getParent();

    C.Stringname=(newFile(“file.txt”)).getParentName();

    D.Stringname=(newFile(“file.txt”)).getParentFile();

    E.Directorydir=(newFile(“file.txt”)).getParentDir();Stringname=dir.getName();


    参考答案:B

  • 第2题:

    【单选题】2、通过()方法可以将内容保存在session中。

    A.session.setAttribute(String name, Object obj)

    B.session.getAttribute(String name)

    C.session.setValues(String name, Object obj)

    D.session.getValues(String name)


    C

  • 第3题:

    下列选项中,能够获取结果集rs的第一列,列名为name的语句是()

    A.String name = rs.getString(1);

    B.String name =rs.getString(0);

    C.String name =rs.getString(“name”);

    D.String name =rs.getString(1,“name”);


    String name = rs.getString(1);;String name =rs.getString(“name”);

  • 第4题:

    在J2EE中,request对象的()方法可以获取页面请求中一个表单组件对应多个值时的用户的请求数据。

    A.String getParameter(String name)

    B.String[] getParameter(String name)

    C.String getParameterValuses(String name)

    D.String[] getParameterValues(String name)


    D

  • 第5题:

    【多选题】下面()是Person类的构造方法。

    A.private Person(){ }

    B.Person(String name,int age){ }

    C.person(String name,int age){ }

    D.public Person(String name,int age,char sex){ }

    E.public void Person(String name,int age,char sex){ }


    A