title: How to print all DirectorNames or ProducerNames etc alphabetically reading from a text file
body: <pre><code>public void alphabeticalListing()
  {
      BufferedReader br = null;
      List&lt;String&gt; lineList = new ArrayList&lt;String&gt;();
      try
      {
          br = new BufferedReader(new FileReader(wishlistname + ".txt"));
          String line;
          while((line = br.readLine())!=null)
          {
              lineList.add(line);
          }
          Collections.sort(lineList);
          for(String output : lineList) {
              System.out.println(output);
          }
      }
      catch(Exception e)
      {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>The file Contains Movie Details...
  Example:</p>
  
  <p>MovieName:DirectorName:ProducerName:Rating:Review</p>
  
  <p>Terminator: Arfath: Khalid : 8 : VeryGood</p>
  
  <p>Hangover  : John  : Lucas  : 7 : NotBad</p>
  
  <p>Jumanji   : Rock  : Brock  : 9 : Good</p>
  
  <p>I want to select ProducerName Column and do SOP in alphabetically like,</p>
  
  <p>Output:</p>
  
  <p>Brock</p>
  
  <p>Khalid</p>
  
  <p>Lucas</p>