One of the rules for converting English to Pig Latin states: If a word begins with a consonant, move the consonant to the end of the word and add “ay”. Thus
“dog” becomes “ogday,” and “crisp” becomes “rispcay”. Suppose s is a String containing an English word that begins with a consonant. Which of the following
creates the correct corresponding word in Pig Latin? Assume the declarations
String ayString = "ay";
String pigString;
(A) pigString = s.substring(0, s.length()) + s.substring(0,1) + ayString;
(B) pigString = s.substring(1, s.length()) + s.substring(0,0) + ayString;
(C) pigString = s.substring(0, s.length()-1) + s.substring(0,1) + ayString;
(D) pigString = s.substring(1, s.length()-1) + s.substring(0,0) + ayString;
(E) pigString = s.substring(1, s.length()) + s.substring(0,1) + ayString;