@Override
public synchronized int compareTo(Beach o) {
if(this == o || !(o instanceof Beach)) return 0;
Beach beach = (Beach) o;
return (int) (this.quality*this.distance - beach.quality* beach.distance);
}
评论 (1)
- 受欢迎
- 新
- 旧
你必须先登录才能发表评论
Guadalupe Gagnon
1 四月 2021, 13:33
The help section is for asking for help when stuck on a task.... not for posting your solution.....
0