📄 student.java
字号:
public class Student
{
int id;
String name;
public Student(int id,String name){
this.id=id;
this.name = name;
}
public String toString(){
return id+" "+name;
}
public boolean equals(Object o){
if(o==null){
return false;
}
if(this == o){
return true;
}
if(o instanceof Student){
Student s1 = (Student)o;
if(s1.id==this.id){
return true;
}else{
return false;
}
}else{
return false;
}
}
public int hashCode(){
return id;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -