title: startsWith(String) method and arrays
body: <p>I have to take a string and convert the string to piglatin. There are three rules to piglatin, one of them being:</p>
  
  <p><em>if the english word starts with a vowel return the english word + "yay" for the piglatin version.</em></p>
  
  <p>So i tried doing this honestly expecting to get an error because the startsWith() method takes a string for parameters and not an array.</p>
  
  <pre><code> public String pigLatinize(String p){
      if(pigLatRules(p) == 0){
          return p + "yay";
      }
  }
  
  public int pigLatRules(String r){
      String vowel[] = {"a","e","i","o","u","A","E","I","O","U"};
      if(r.startsWith(vowel)){
          return 0;
      }        
  }
  </code></pre>
  
  <p>but if i can't use an  array i'd have to do something like this</p>
  
  <pre><code>if(r.startsWith("a")||r.startsWith("A")....);
       return 0;
  </code></pre>
  
  <p>and test for every single vowel not including y which would take up a very large amount of space, and just personally I would think it would look rather messy. </p>
  
  <p>As i write this i'm thinking of somehow testing it through iteration.</p>
  
  <pre><code> String vowel[] = new String[10];
   for(i = 0; i&lt;vowel[]; i++){
       if(r.startsWith(vowel[i]){
           return 0;
       }
  </code></pre>
  
  <p>I don't know if that attempt at iteration even makes sense though.</p>