I have a program that i need to make that takes input and then checks it for vowels and deletes the vowels then reoutputs the word with no vowels.. This is what I have so far:
Quote:
public static void noVowel(){
String word;
int numChars;
char letter;
word = JOptionPane.showInputDialog(null, "Please Enter a Word: " );
numChars = word.length();
for(int i = 0; i<numChars; i++){
letter = word.charAt(i);
if( letter == 'a' || letter == 'A' ||
letter == 'e' || letter == 'E' ||
letter == 'i' || letter == 'I' ||
letter == 'o' || letter == 'O' ||
letter == 'u' || letter == 'U')
}//end of loop
}//end of noVowel Method
|
and i cant figure out for the life of me what goes in the if statement to make it delete the vowels..