Forums Register Login
Help with sorting

I a newbie in java and i ran into a problem at sorting.

I have the following code

I don't know why when i build the project, the desc oerdering doensn't execute.

Any solutions ?

Thank you
just verify the flow of control in your program. first please, use braces { ,} for your for loop. and now debug your application!
and Welcome to JavaRanch
After i build, the outpus says that this part:

is ignored, so somehow i have to make the desc sorting posible.

P.S. Thank you
Welcome to CodeRanch!

It sounds like s.getOrder is true? Since either the if or else has to execute. Did you try adding a debug statement to check on this value.
Can't .... do .... plaid .... So I did this tiny ad instead:

This thread has been viewed 644 times.

All times above are in ranch (not your local) time.
The current ranch time is
Mar 21, 2018 15:01:42.