@Override
public boolean equals(Object o) {
if(this == o) {
return true;
}

if(!(o instanceof Emp)) {
return false;
}

Emp emp = (Emp)o;

return this.id == emp.id;
}

@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + id;
return result;
}

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

///3
Iterator it = map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry m = (Map.Entry) it.next();
System.out.println("key:"+m.getKey()+",value:"+m.getValue());
}
//4
public Computer(float price,String year,String time,String people) {
this.price = price;
this.year = year;
super.setRksj(time);
super.setRkczy(people);

}

相关文章:

  • 2022-03-07
  • 2021-07-28
  • 2021-07-02
  • 2021-10-19
  • 2021-10-05
  • 2021-12-29
  • 2021-12-06
  • 2021-07-04
猜你喜欢
  • 2022-12-23
  • 2021-07-25
  • 2021-11-27
  • 2021-06-11
  • 2021-11-16
  • 2022-12-23
  • 2021-09-13
相关资源
相似解决方案