单项选择题X 纠错

A.The equals method does NOT properly override the Object.equals method.
B.Compilation fails because the private attribute p.name cannot be accessed in line 5.
C.To work correctly with hash-based data structures,this class must also implement the hashCode method.
D.When adding Person objects to a java.util.Set collection,the equals method in line 4 will prevent duplicates.


参考答案:
查答案就用赞题库小程序 还有拍照搜题 语音搜题 快来试试吧
无需下载 立即使用

你可能喜欢

单项选择题

A.The value "4" is printed at the command line.
B.Compilation fails because of an error in line 5.
C.Compilation fails because of an error in line 9.
D.A NullPointerException occurs at runtime.
E.A NumberFormatException occurs at runtime.
F.An IllegalStateException occurs at runtime.

单项选择题

A.Compilation fails.
B.pi is bigger than 3.
C.An exception occurs at runtime.
D.pi is bigger than 3. Have a nice day.
E.pi is not bigger than 3. Have a nice day.

单项选择题

A.Line 33 must be called within a try block.
B.The exception thrown by method 1 in class A is not required to be caught.
C.The method declared on line 31 must be declared to throw a runtime exception.
D.On line 5 of class A,the call to method 2 of class B does not need to be placed in a try catch block.

单项选择题

A.no output
B.no outputassert is on
C.assert is on
D.no outputAn AssertionError is thrown.
E.assert is onAn AssertionError is thrown.

多项选择题

A.The instance gets garbage collected.
B.The code on line 33 throws an exception.
C.The code on line 35 throws an exception.
D.The code on line 31 throws an exception.
E.The code on line 33 executes successfully.

单项选择题

A.test end
B.Compilation fails.
C.test runtime end
D.test exception end
E.A Throwable is thrown by main at runtime.

单项选择题

A.00
B.0001
C.000120
D.00012021
E.Compilation fails
F.An exception is thrown at runtime

单项选择题

A.Alpha a = x;
B.Foo f = (Delta)x;
C.Foo f = (Alpha)x;
D.Beta b = (Beta)(Alpha)x;

赞题库

赞题库-搜题找答案

(已有500万+用户使用)


  • 历年真题

  • 章节练习

  • 每日一练

  • 高频考题

  • 错题收藏

  • 在线模考

  • 提分密卷

  • 模拟试题

无需下载 立即使用

版权所有©考试资料网(ppkao.com)All Rights Reserved