Search:

Type: Posts; User: Json

Search: Search took 0.10 seconds.

  1. Replies
    10
    Views
    2,987

    Re: alphabetizing , plz help

    What helloworld means is that you can have your object that has the string in it implement Comparable. After that all you need to do is Collections.sort(listOfObjectsHere) and it will automatically...
  2. Replies
    10
    Views
    2,987

    Re: alphabetizing , plz help

    Well, using Collections.sort passing in a list of Strings it will automatically sort them alphabetically because thats how strings are sorted naturally just like ints would be 0,1,2,3,4 etc.

    What...
  3. Replies
    10
    Views
    2,987

    Re: alphabetizing , plz help

    You could create your own comparator and do it.

    What are your sorting rules?

    // Json
  4. Replies
    10
    Views
    2,987

    Re: alphabetizing , plz help

    So lets say all items in the list are strings, this is what we do.



    final List<String> letters = Arrays.asList(new String[] { "f", "g", "e", "o", "a", "y", "r" });
    ...
Results 1 to 4 of 4