Results 1 to 2 of 2
  1. #1
    jonytek is offline Member
    Join Date
    Feb 2011
    Posts
    38
    Rep Power
    0

    Default Sorting a String array based on a substring

    Is it possible to sort a String[] based on a substring?

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

    Default

    Sure, write your own Comparator. Then use Collections.sort method.

Similar Threads

  1. Sorting string Array Values
    By Zerpol in forum New To Java
    Replies: 1
    Last Post: 01-14-2011, 07:08 AM
  2. Search Substring in String Help Please
    By Kestrel01 in forum New To Java
    Replies: 3
    Last Post: 10-26-2010, 06:48 PM
  3. Replies: 5
    Last Post: 06-22-2010, 09:34 AM
  4. Concatinating contents of a string array based on condition
    By gangsterooseven in forum Advanced Java
    Replies: 2
    Last Post: 10-07-2009, 07:35 AM
  5. String substring function
    By ravian in forum New To Java
    Replies: 6
    Last Post: 01-02-2008, 07:35 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
  •