How to sort array of objects(i.e array of objects of class student) by marks attribute but without using comparator?
class Student
{
private int rollNo;
private double marks;
public Student(int rollNo, String name, double marks) {
this.rollNo = rollNo;
this.marks = marks;
}
}