可学答题网 > 问答 > SCJP程序员认证考试题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

What is the appropriat


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

  • Areturn super.hashCode();
  • Breturn name.hashCode() + age * 7;
  • Creturn name.hashCode() + comment.hashCode() / 2;
  • Dreturn name.hashCode() + comment.hashCode() / 2- age * 3;
参考答案
参考解析:
分类:SCJP程序员认证考试题库
相关推荐

1、What is the most 

What is the most likely reason for the dispartly between the actual network numbers at the...

2、What is the result?()

What is the result?()A foo has the valueB foo has the value null.C An exception is thrown.D The code will not compile.

3、What is the result?()

What is the result?()AX, followed by an Exception.BNo output, and an Exception is thrown.CCompi...

4、What is the most 

What is the most likely reason for the dispartly between the actual network numbers at the...

5、What is the result?()

What is the result?()AAn exception is thrown at runtime.BCompilation fails because of an error&en...

6、What is the result?()

What is the result?()Atest endBCompilation fails.Ctest runtime endDtest exception endEA Throwable is thrown by main at runtime.