title: Searching for a String in an Array and returning the position
body: <p>Hi I'm a complete newbie on programming and I try to search for a certain <code>String</code> in an array. When it's found the method should return the index but if the <code>String</code> is not found it should return -1.</p>
  
  <pre><code>public int poitionOfWord(String testWord) {
      for (int i = 0; i &lt; wordArray.length; i++) {
          if (wordArray[i].equals(testWord)) {
              return i;
          }
      }
      return -1;
  }
  </code></pre>
  
  <p>would this method return always -1 or would it actually terminate when finding a word and would return i.</p>