title: How to fix this sort method?
body: <p>Here is the sort method for sorting words by second char and it is dosnt work(
  Can anyone say how to fix it?</p>
  
  <pre><code>out = new StringTokenizer(input.toString());
  n = out.countTokens();
  List&lt;String&gt; wordList = new ArrayList&lt;String&gt;(n);
  for (int i = 0; i &lt; n; i++) {
    wordList.add(out.nextToken());
  }
  Collections.sort(wordList, new Comparator&lt;String&gt;() {
    public int compare(String o1, String o2) {
      return compare(o1.substring(1, 2).compareTo(o2.substring(1, 2)));
    }
  });
  </code></pre>