doing a lab for class ( cannot use ARRAY )** its a langue converter and i have to put 'ub' after every vowel i was wondering how i could do this WITHOUT AN ARRAY so far i have but it just adds "ub" after the second letter in a string
private static String toUbbi(String word ) {
String set = " ";
if (Vowel (word)){
set= word.substring(0)+ "ub"+word.substring(1) ;
set = word.substring(0,1)+ "ub"+word.substring(1);
}
return set;
}
private static boolean Vowel(String word ) {
String[] vowels ={ "a", "e", "i", "o", "u", "ue"} ;
//char x = word.charAt(0);
return (vowels.length !=-1);
}
Stringinto which you can append the changes, substring each prefix section (up to the next vowel). This gets added to the "target" and "ub". Remove this prefix from the originalStringand continue until the originalStringis 0 in length and/or no vowles remain. Assign the target to the original and return...