BufferedReader bufr = new BufferedReader(new InputStreamReader(System.in));
s.setName(bufr.readLine());
System.out.println("请输入第 "+i+"个学生成绩1;");
BufferedReader bufr1 = new BufferedReader(new InputStreamReader(System.in));
s.setStore1(Double.parseDouble(bufr1.readLine()));
System.out.println("请输入第" + i + "个学生成绩2;");
BufferedReader bufr2 = new BufferedReader(new InputStreamReader(System.in));
s.setStore2(Double.parseDouble(bufr2.readLine()));
System.out.println("请输入第" + i + "个学生成绩3;");
BufferedReader bufr3 = new BufferedReader(new InputStreamReader(System.in));
s.setStore3(Double.parseDouble(bufr3.readLine()));
ts.add(s);
//这里总是报错,Exception in thread "main" java.lang.ClassCastException: wo.Student cannot be cast to java.lang.Comparable
at java.util.TreeMap.compare(Unknown Source)
at java.util.TreeMap.put(Unknown Source)
at java.util.TreeSet.add(Unknown Source)
at wo.xuesheng.main(xuesheng.java:42)