
sir i have a class Student.it contains id,name,marks of students and a parameteraised constructor.now i created an arraylist for storing the objects of Student class.i.e
Student s1=new student(1,"ram",23); Student 21=new student(2,"ramana",35); Student s3=new student(3,"ramraju",63); ArrayList<Student> a=new ArrayList<Student>(); a.add(s1); a.add(s2); a.add(s3);
my question is...how can we sort the students by their marks?how to access marks from arraylist??