试题详情
单项选择题 以下哪个是适当的hashCode定义方法?()

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;

  • B
  • 关注下方微信公众号,在线模考后查看

热门试题