Linked Questions

Popular Questions

i have a class called student, the class have two elements (Name, ID). in my main class, i have created about 10 students in an array i called it students,

now i want to sort the the students array respecting the ID, or the name!!

if i used this line of code

array.sort(students);

is there a way to use the sort method and choose which element i want to sort the array with???

Related Questions