title: How to index value in a String away
body: <p>So for homework we need to find the exact <code>String</code> object in the <code>String array</code>. This is my code</p>
  
  <pre><code>public String get( int idx ){//IT HAS TO RETURN STRING AND TAKE A INT
  
      for(int i = 0; i&lt;wo.length; i ++)
      if(wo[i]==wo[idx])
      return wo[i];
  }
  </code></pre>
  
  <p>I tried casting to string but it didnt work. Does anyone have any ideas on what to do? </p>
  
  <p>Thanks.</p>