欢迎来到建筑考试题库网 建筑考试题库官网
全部科目 > Oracle认证考试 > OCJP(310-065)

单项选择题

Given:

What is the appropriate definition of the hashCode method in class Person?()

    A.return super.hashCode();
    B.return name.hashCode() + age * 7;
    C.return name.hashCode() + comment.hashCode() / 2;
    D.return name.hashCode() + comment.hashCode() / 2 - age * 3;

点击查看答案

相关考题

  • 单项选择题
    Click the Exhibit button. Which statement is true about the set variable on line 12?()

    A.The set variable contains all six elements from the coll collection, and the order is guaranteed to be preserved.
    B.The set variable contains only three elements from the coll collection, and the order is guaranteed to be preserved.
    C.The set variable contains all six elements from the coll collection, but the order is NOT guaranteed to be preserved.
    D.The set variable contains only three elements from the coll collection, but the order is NOT guaranteed to be preserved.

  • 多项选择题
    Click the Exhibit button. What two must the programmer do to correct the compilation errors?()

    A.insert a call to this() in the Car constructor
    B.insert a call to this() in the MeGo constructor
    C.insert a call to super() in the MeGo constructor
    D.insert a call to super(vin) in the MeGo constructor
    E.change the wheelCount variable in Car to protected

  • 单项选择题
    Given: What is the result?()

    A.Compilation fails.
    B.Cannot add Toppings
    C.The code runs with no output.
    D.A NullPointerException is thrown in Line 4.

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题