Java : Sorting unsorted array in descending order

Posted by Bader on Stack Overflow See other posts from Stack Overflow or by Bader
Published on 2010-04-18T18:17:40Z Indexed on 2010/04/18 18:23 UTC
Read the original article Hit count: 397

Filed under:

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[i + 1].GetGpa()) { temp[i] = s[i]; } }

how should i do it using for loops

© Stack Overflow or respective owner

Related posts about java