title: java.text.Collator for String comparison.,
body: <p>Trying to use Collators for validating couple String objects., Here is the code.,</p>
  
  <pre><code>String myBubbleStr[] = {"zoon", "Hello", "World", "Yep", "Yow", "MyData"};
      public void testCollatorStrings() {
          Collator collator = Collator.getInstance();
          String toCompare = "yow";
          for (String collatorCompare : myBubbleStr) {
              System.out.println(collator.compare(collatorCompare, toCompare));
  
          }
      }
  </code></pre>
  
  <p>My expectation of the output is -1,-1,-1,-1,1,-1. 
  According to the <a href="http://docs.oracle.com/javase/6/docs/api/java/text/Collator.html#compare%28java.lang.String,%20java.lang.String%29" rel="nofollow">documentation</a>. </p>
  
  <blockquote>
    <p>Returns an integer value. Value is less than zero if source is less
    than target, value is zero if source and target are equal, value is
    greater than zero if source is greater than target.</p>
  </blockquote>
  
  <p>But the output I get is </p>
  
  <blockquote>
    <p>1
     -1
     -1
     -1 1
    -1</p>
  </blockquote>
  
  <p>Can somone help, how to get about this validation., The reason am using collators is to over the unicode restrictions for String comparison. Thanks.,</p>