title: Java program to print vowels in an array?
body: <p>I am writing a program to find the number of vowels in each word within an array. I have the code finished, I am just unsure of what the return value should look after the if statement. </p>
  
  <pre><code>public static int vowels(char [] array, int x, int y) {
      if(array[x]=='a' || array[x]=='e' || array[x]=='i' || array[x]=='o' || 
                                           array[x]=='u' || array[x]=='y') {
          y++;
      }
      if (x &lt; array.length) {
          x++;
          vowels (array, x, y);
          return ???;
      } else {
          return y;
      }
  }
  </code></pre>