title: Create a SortedMap in Java with a custom Comparator
body: <p>I want to create a <code>TreeMap</code> in Java with a custom sort order. The sorted keys which are string need to be sorted according to the second character. The values are also string.</p>
  
  <p>Sample map:</p>
  
  <pre><code>Za,FOO
  Ab,Bar
  </code></pre>