Results 1 to 2 of 2
  1. #1
    cavsfan223 is offline Member
    Join Date
    Sep 2012
    Rep Power

    Default Making a string comparator

    How does one make a comparator for strings to sort them lexicographically?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

    Default Re: Making a string comparator

    You don't need to do this as it's already been done for you. String implements the Comparable<String> interface and thus can be sorted lexicographically.

Similar Threads

  1. Making string insensitive to upper or lower case
    By ahmedaa16 in forum New To Java
    Replies: 0
    Last Post: 10-21-2011, 12:59 PM
  2. Making a grid in a string
    By josh2992 in forum New To Java
    Replies: 6
    Last Post: 05-27-2011, 08:46 AM
  3. Making a grid using a String.
    By josh2992 in forum New To Java
    Replies: 5
    Last Post: 05-10-2011, 02:11 PM
  4. Making a String Array from a text file
    By MrJimmah in forum New To Java
    Replies: 5
    Last Post: 11-16-2010, 11:19 PM
  5. how to use comparator
    By KidneyinaCooler in forum Advanced Java
    Replies: 2
    Last Post: 07-18-2010, 10:25 AM

Posting Permissions

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