Results 1 to 11 of 11
- 03-26-2009, 11:36 PM #1
Member
- Join Date
- Mar 2009
- Posts
- 6
- Rep Power
- 0
- 03-26-2009, 11:42 PM #2
hhhmmm... now where did I put that ouija board ...?
Well, without seeing the code .... and my crystal ball was stolen by an evil wizard :-)
Luck,
CJSLChris S.
Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.
- 03-26-2009, 11:43 PM #3
Member
- Join Date
- Mar 2009
- Posts
- 6
- Rep Power
- 0
11111111111111111111111111111111111
Last edited by taylorp; 03-27-2009 at 01:08 AM.
- 03-26-2009, 11:52 PM #4
Senior Member
- Join Date
- Sep 2008
- Posts
- 564
- Rep Power
- 5
mmm. typecasting galore. personally, i'd keep the sorting functionality to a sort method and not put it in the add method. but if that's your specs, then i guess it's what you should be doing.
- 03-26-2009, 11:58 PM #5
Member
- Join Date
- Mar 2009
- Posts
- 6
- Rep Power
- 0
111111111111111111111
Last edited by taylorp; 03-27-2009 at 01:08 AM.
- 03-27-2009, 12:05 AM #6
Senior Member
- Join Date
- Sep 2008
- Posts
- 564
- Rep Power
- 5
well, if your compareTo method is saying that 3 < 98, then you implemented it wrong.
- 03-27-2009, 12:11 AM #7
Member
- Join Date
- Mar 2009
- Posts
- 6
- Rep Power
- 0
111111111111111111111111111111111111
Last edited by taylorp; 03-27-2009 at 01:08 AM.
- 03-27-2009, 12:16 AM #8
Senior Member
- Join Date
- Sep 2008
- Posts
- 564
- Rep Power
- 5
i meant 3 > 98 obviously, but anyways, no idea what your compareTo method does. you only posted your add method.
- 03-27-2009, 12:18 AM #9
Member
- Join Date
- Mar 2009
- Posts
- 6
- Rep Power
- 0
111111111111111111111111111
Last edited by taylorp; 03-27-2009 at 01:08 AM.
- 03-27-2009, 12:31 AM #10
Senior Member
- Join Date
- Nov 2008
- Posts
- 286
- Rep Power
- 5
OK, that'll be the problem then... Suggest you read the documentation of String.compareTo() to see what it actually does, and then see if that's what you wanted.
Neil Coffey
Javamex - Java tutorials and performance info
- 03-27-2009, 12:34 AM #11
Member
- Join Date
- Mar 2009
- Posts
- 6
- Rep Power
- 0
Similar Threads
-
How to change Bubble+Selection+Insertion Sorts to Sort String Values?
By VinceGuad in forum New To JavaReplies: 3Last Post: 01-26-2009, 12:20 AM -
Linked List integer list
By igniteflow in forum Advanced JavaReplies: 1Last Post: 12-10-2008, 08:53 PM -
How to sort a list using Bubble sort algorithm
By Java Tip in forum AlgorithmsReplies: 3Last Post: 04-29-2008, 08:04 PM -
Insertion Sort in Java
By Java Tip in forum AlgorithmsReplies: 0Last Post: 04-15-2008, 07:41 PM -
Insertion sort algorithm
By Albert in forum Advanced JavaReplies: 2Last Post: 06-28-2007, 08:26 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks