Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- class Student implements Serializable {
- String name;
- String egn;
- int note;
- Student(String name, int note, String egn) {
- this.name = name;
- this.note = note;
- this.egn = egn;
- }
- public String toString() {
- return name + " " + note + " " + egn;
- }
- public int compareTo(Student other) {
- return this.name.toLowerCase().compareTo(other.name.toLowerCase());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement