aspose file tools*
The moose likes Beginning Java and the fly likes Problem with Sort Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with Sort Method" Watch "Problem with Sort Method" New topic
Author

Problem with Sort Method

Nick Hallloran
Greenhorn

Joined: Feb 09, 2010
Posts: 19
I need to sort three numbers in ascending order. The first two are properly done but the third number that is entered always shows up as the first number...just wondering where i am going wrong

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Be careful not to fall from your chair when looking at the following part :


[My Blog]
All roads lead to JavaRanch
Nick Hallloran
Greenhorn

Joined: Feb 09, 2010
Posts: 19
haha wow! I cant believe i missed that...yea it definitely hurt falling out of my chair
Ireneusz Kordal
Ranch Hand

Joined: Jun 21, 2008
Posts: 423
Error is in lines 78/79 - your output is: third + second + third.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Sort Method
 
Similar Threads
Number calculations
Integer Object Comparision Confusion
[solved]when i run file,promt message "Class "lab4.que1" does not have a main method."why?
Triangle Perimeter HELP!!!
Erroneous sym type What does this mean?