在自定义类中,建议覆盖toString()方法、hashCode()方法、equals()方法。例如:
class Employee{
public Employee(){
}
public String toString(){
return "Employee's String.";
}
}
在自定义类中,建议覆盖toString()方法、hashCode()方法、equals()方法。例如:
class Employee{
public Employee(){
}
public String toString(){
return "Employee's String.";
}
}