Results 1 to 4 of 4
  1. #1
    anonymous445 is offline Member
    Join Date
    Jan 2011
    Posts
    14
    Rep Power
    0

    Default using the compareTo method

    Hi, how could you use the compareTo method to terminate a sentinal in a loop. Can you even do this??

  2. #2
    JavaHater is offline Senior Member
    Join Date
    Dec 2010
    Posts
    165
    Rep Power
    4

    Default

    show a bit of your code if you are even doing it.

  3. #3
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,785
    Rep Power
    7

    Default

    You can use it to iterate over a sorted list.

  4. #4
    anonymous445 is offline Member
    Join Date
    Jan 2011
    Posts
    14
    Rep Power
    0

    Default

    Quote Originally Posted by JavaHater View Post
    show a bit of your code if you are even doing it.
    I'm not doing it, i was just curious if it was possible to do.

Similar Threads

  1. need help wit this compareTo method
    By ShinTec in forum New To Java
    Replies: 4
    Last Post: 02-02-2010, 02:24 AM
  2. ArrayLists compareTo method, equals method
    By random0munky in forum New To Java
    Replies: 2
    Last Post: 10-26-2009, 07:20 PM
  3. Replies: 5
    Last Post: 10-13-2009, 01:35 PM
  4. Replies: 8
    Last Post: 03-19-2009, 09:38 PM
  5. how compareTo Method works
    By nanaji in forum Advanced Java
    Replies: 1
    Last Post: 06-22-2008, 07:40 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
  •