title: How to concatenate words that starts and end with a vowel?
body: <p>I receive a list of words and assigns them to write all the words that start and end with a vowel.
  I need to write a MasinaDeTeme class that contains a public Word filtering method.
  The method will receive as a parameter a string of String (String []) and will return a StringBuffer that will contain all the words with the required property concatenated in the order in which they appear in the string.</p>
  <p>Here is the part of my cod where is my problem:</p>
  <pre><code>public static StringBuffer filtrareCuvinte(String[] cuvinte){
     
      for(int i = 0; i &lt; cuvinte.length; i++)
  
          if(isVowel(cuvinte[i].charAt(0)) &amp;&amp; isVowel(cuvinte[i].charAt(cuvinte.length - 1)))
              s.append(cuvinte[i]);
  
      return s;
  }
  </code></pre>
  <p>}</p>
  <p>I receive an error:
  Exception in thread &quot;main&quot; java.lang.StringIndexOutOfBoundsException: String index out of range: 3</p>
  <p>I think its because of the length. Any suggestions?</p>