[Logo]
Forums Register Login
Help with sorting
Hello.

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.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 672 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jun 20, 2018 00:05:42.