📄 people.java
字号:
import java.io.*;
public class People implements Serializable,Comparable{
String name=null;
int time=0;
int count=0;
public People(String name,int t,int count){
this.name=name;
time=t;
this.count=count;
}
public int getTime(){
return time;
}
public String getName(){
return name;
}
public int getCount(){
return count;
}
public int compareTo(Object b){
/* People p=(People)b;
if((this.time-p.time)==0)
return 1;
else
return (this.time-p.time);
*/
People p=(People)b;
if((this.count-p.count)==0)
return 1;
else
return (this.count-p.count);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -