title: Java: list sorting where a<A<b<B<...z<Z
body: <p>I used </p>
  
  <pre><code>Collections.sort(slist, Collator.getInstance(Locale.ENGLISH));
  </code></pre>
  
  <p>and it works with "a" and "A"
  for example it sorts
  apple before Apple</p>
  
  <pre><code> [apple, Apple]
  </code></pre>
  
  <p>However, it has this strange behavior that I couldn't understand.
  if I have "AApple" and "apple", it sorts it like </p>
  
  <pre><code> [AApple, apple]
  </code></pre>
  
  <p>another example is "Ahmad" and "ali" or "AA" and "aaaaa". It sorts it like</p>
  
  <pre><code>[Ahmad ,ali]
  [A, aaaaa]
  </code></pre>
  
  <p>What I wanted is sort that makes a
  
  <p>for example</p>
  
  <pre><code>a
  aa
  aaaaaa
  aaaaaaaaaaa
  A
  AAAAAA
  AAAAAAAAA 
  b
  bbb
  bbbbb
  B
  BBBB
  </code></pre>