展开全部
你好,纯手打,建议看一下是62616964757a686964616fe4b893e5b19e31333365663530否符合你的要求。public class Student {
private String name;
private Integer stuNo;
private Double score;
//省略get set方法
public Student(){
}
public Student(String name,Integer stuNo,Double score){
this.name = name;
this.stuNo = stuNo;
this.score = score;
}
public String toString(){
return this.name+"\t"+this.stuNo+"\t"+this.score;
}
}
public class TestStudent {
public static void main(String[] args){
List list = new ArrayList();
list.add(new Student("Jack",1001,67.0d));
list.add(new Student("Rose",1002,89.0d));
list.add(new Student("James",1003,45.0d));
list.add(new Student("Lucy",1004,95.0d));
list.add(new Student("Anna",1005,80.0d));
Systen.out.println("姓名\t学号\t成绩");
for(Student stu : list){
System.out.println(stu.toString());
}
}
}