title: Java convert to English to Piglatin using array
body: <p>i want to write a program to convert English to Piglantin using Java,but unlike the traditional way i want to store the vowels in an array...but apparently that doesn't work,i have my boards tomorrow and it would be quite helpful if you could point out my mistake....here's the program snippet</p>
  
  <pre><code>class Piglatin_2
  {
  
      public static void main(String s)
      {
          s = s.toUpperCase();
          char c[] = {'A', 'E', 'I', 'O', 'U'};
          String a = "";
          for(int i = 0; i &lt; s.length(); i++)
          {
              for(int j = 0; j &lt; 5; j++)
              {
                 if(s.charAt(i) == c[j])
                 {
                     a = s.substring(i) + s.substring(0, i) + "AY";
                     break;
                 }
              }
         }
         System.out.println("Piglatin:"+a);
      }
  }
  </code></pre>
  
  <p>I am using the string "London" as an input.
  The supposed output should be "ONDONLAY"
  But i am getting "ONLONDAY"</p>