hi guys
i had an array of objects , i need to know how should i sort my unsorted array in descending order according to the highest value inside objects
i need this using for loops not the easy way.
i had done this but it seems there is a problem
code
student[] temp=new student[s.length];
for (int i=0;i<s.length;i++)
{
if (s[i].GetGpa() > s[i + 1].GetGpa())
{
temp[i] = s[i];
}
}
how should i do it using for loops