违法和不良信息举报 联系客服
免费注册 登录
  • 首页
  • 电气工程师
  • 岩土工程师
  • 一级建造师
  • 二级建造师
  • 造价工程师
  • 安全工程师
  • 招标师
  • 监理工程师
  1. 首页
  2. 计算机类
  3. 其他
  4. 题目

WhatistheappropriatedefinitionofthehashCodemethodinclassPerson?()

题目内容(请给出正确答案)
WhatistheappropriatedefinitionofthehashCodemethodinclassPerson?()

A.returnsuper.hashCode();

B.returnname.hashCode()+age*7;

C.returnname.hashCode()+comment.hashCode()/2;

D.returnname.hashCode()+comment.hashCode()/2-age*3;

参考答案和解析
参考答案:B
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
更多相关问题
  • 第1题

    publicclassPerson{privateStringname,comment;privateintage;publicPerson(Stringn,inta,Stringc){name=n;age=a;comment=c;}publicbooleanequals(Objecto){if(!(oinstanceofPerson))returnfalse;Personp=(Person)o;returnage==p.age&&name.equals(p.name);}}WhatistheappropriatedefinitionofthehashCodemethodinclassPerson?()A.returnsuper.hashCode();B.returnname.hashCode()+age*7;C.returnname.hashCode()+comment.hashCode()/2;D.returnname.hashCode()+comment.hashCode()/2-age*3;

    点击查看答案

  • 第2题

    Given:WhatistheappropriatedefinitionofthehashCodemethodinclassPerson?()A.returnsuper.hashCode();B.returnname.hashCode()+age*7;C.returnname.hashCode()+comment.hashCode()/2;D.returnname.hashCode()+comment.hashCode()/2-age*3;

    点击查看答案

相关内容
  • 中石油加油卡客服知识竞赛
  • 丁苯橡胶生产工
  • 三维动画
  • 06216中外建筑史
  • 图书资料员(初中高级技师)
  • 华为H35-910
  • 公共基础
  • 人生与人心
  • 康复医学治疗技术(师)
  • 奥运知识竞赛
开通会员查看答案
联系客服

联系我们 关于我们 免责声明 违法和不良信息举报 服务协议 会员须知

     

© 2020-2025 www.soutijiang.com 搜题匠 - 苏ICP备2022028809号-1