title: Checking vowels in string array
body: <p>This is the code I have written to count the amount of vowels in a string array:</p>
  
  <pre><code>int vowels = 0;
  for (int x = 0; x &lt; arrayInput.length; x++) {
      for (int a = 0; a &lt; arrayInput[x].length(); a++){
          switch (arrayInput[x].charAt(a)){
              case 'A': vowels++;
              case 'a': vowels++;
              case 'E': vowels++;
              case 'e': vowels++;
              case 'I': vowels++;
              case 'i': vowels++;
              case 'O': vowels++;
              case 'o': vowels++;
              case 'U': vowels++;
              case 'u': vowels++;
              case 'Y': vowels++;
              case 'y': vowels++;
          }
      }
  }
  </code></pre>
  
  <p>However, vowels always returns 0. Why?</p>
  
  <p>Found the problem!
  This code earlier in the program:</p>
  
  <pre><code>String[] vowelArray = arrayInput;
  for (int x = 0; x &lt; vowelArray.length; x++) {
      vowelArray[x] = vowelArray[x].replaceAll("[AEIOUYaeiouy]", "_");
  }
  for (int x = 0; x &lt; vowelArray.length; x++) {
      System.out.print(vowelArray[x] + " ");
  }
  </code></pre>
  
  <p>Was changing the value of `arrayInput'
  Does anyone know why?</p>