View Single Post
Old 11-20-2003, 06:29 PM   #1 (permalink)
Scape
Insane
 
Java Question need help fast

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..
Scape is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73