title: Binary searching for string arrays
body: <p>How do I sort an array of string for binary search. Below I always recieve a minus number for my index instead of the correct index. Please help? If the word is not in the array -1 should be returned.</p>
  
  <pre><code>  public static int binary (String [] theword, String a) {
      int index = -1;
          Arrays.sort(theword);
          Arrays.toString(theword);
          index = Arrays.binarySearch(theword, a);
      return index;
  
  }   
  </code></pre>