Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with sorting

 
Apostu Paul
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just verify the flow of control in your program. first please, use braces { ,} for your for loop. and now debug your application!
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and Welcome to JavaRanch
 
Apostu Paul
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic