第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

java集合的問題

java集合的問題

慕先生4463397 2017-10-16 16:53:48
/**?* @author 墨風(fēng)?*/public class Student implements Comparable{ //名字 String name; //分?jǐn)?shù) int score; int age; public Student(String name,int score){ this.name = name; this.score = score; } public String toString(){ return name+"得了"+score+"分"; } public boolean equals(Object o){ if(this==o){ return true; } if(o instanceof Student){ Student stu = (Student) o; if(stu.name.equals(this.name)&&(stu.score==this.score)){ return true; } } return false; } public int hashCode(){ return score/10; }23行的this指的是
查看完整描述

2 回答

已采納
?
窗下有梧桐

TA貢獻(xiàn)5條經(jīng)驗(yàn) 獲得超3個(gè)贊

this指的是當(dāng)前對象,比如你調(diào)用a.equals(b),那么this指的就是a對象,望采納。

查看完整回答
1 反對 回復(fù) 2017-10-16
?
窗下有梧桐

TA貢獻(xiàn)5條經(jīng)驗(yàn) 獲得超3個(gè)贊

。。那個(gè)不是0啊,是一個(gè)object類型的對象o

查看完整回答
1 反對 回復(fù) 2017-10-17
  • 2 回答
  • 0 關(guān)注
  • 1078 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)