Results 1 to 11 of 11
  1. #1
    taylorp is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Question

    111111111111111111111
    Last edited by taylorp; 03-27-2009 at 01:08 AM.

  2. #2
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default 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,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  3. #3
    taylorp is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    11111111111111111111111111111111111
    Last edited by taylorp; 03-27-2009 at 01:08 AM.

  4. #4
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    6

    Default

    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.

  5. #5
    taylorp is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    111111111111111111111
    Last edited by taylorp; 03-27-2009 at 01:08 AM.

  6. #6
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    6

    Default

    well, if your compareTo method is saying that 3 < 98, then you implemented it wrong.

  7. #7
    taylorp is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    111111111111111111111111111111111111
    Last edited by taylorp; 03-27-2009 at 01:08 AM.

  8. #8
    emceenugget is offline Senior Member
    Join Date
    Sep 2008
    Posts
    564
    Rep Power
    6

    Default

    i meant 3 > 98 obviously, but anyways, no idea what your compareTo method does. you only posted your add method.

  9. #9
    taylorp is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    111111111111111111111111111
    Last edited by taylorp; 03-27-2009 at 01:08 AM.

  10. #10
    neilcoffey is offline Senior Member
    Join Date
    Nov 2008
    Posts
    286
    Rep Power
    6

    Default

    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.

  11. #11
    taylorp is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    111111111111111111111111111111
    Last edited by taylorp; 03-27-2009 at 01:08 AM.

Similar Threads

  1. Replies: 3
    Last Post: 01-26-2009, 12:20 AM
  2. Linked List integer list
    By igniteflow in forum Advanced Java
    Replies: 1
    Last Post: 12-10-2008, 08:53 PM
  3. How to sort a list using Bubble sort algorithm
    By Java Tip in forum Algorithms
    Replies: 3
    Last Post: 04-29-2008, 08:04 PM
  4. Insertion Sort in Java
    By Java Tip in forum Algorithms
    Replies: 0
    Last Post: 04-15-2008, 07:41 PM
  5. Insertion sort algorithm
    By Albert in forum Advanced Java
    Replies: 2
    Last Post: 06-28-2007, 08:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •