what is the meaning of object o1,o2 here in collections.sort? and why he didn't write Process instead of object beacuse our list is based on process object
public static void sortremaning(ArrayList<Process> L) {
Collections.sort(L, (Object o1, Object o2) -> {
if (((Process) o1).getRemaningtime() == ((Process) o2).getRemaningtime()) {
return 0;
} else if (((Process) o1).getRemaningtime() < ((Process) o2).getRemaningtime()) {
return -1;
} else {
return 1;
}
});
}