title: Sort ArrayList alphabetically by value after a comma in each String
body: <p>I have an ArrayList containing Strings that looks like this:</p>
  
  <ul>
  <li>Item1: Some text, Annabelle</li>
  <li>Item2: Some text, James</li>
  <li>Item3: Some text, Conner</li>
  </ul>
  
  <p>I would like to sort the ArrayList alphabeticlly by the value after the comma in each String.</p>
  
  <p>How can I achieve this?</p>
  
  <pre><code>    ArrayList&lt;String&gt; lineList = new ArrayList&lt;&gt;();
  
      // New BufferedReader.
      BufferedReader reader = new BufferedReader(new FileReader(
              file));
  
      // Add all lines from file to ArrayList.
      while (true) {
          String line = reader.readLine();
          if (line == null) {
              break;
          }
          lineList.add(line);
      }
  
      // Close it.
      reader.close();
  
      // Print each line.
      for (String line : lineList) {
          System.out.println(line);
      }
  </code></pre>