If you can’t clearly explain what your program is supposed to do given some example input, how do you expect to write a program that works? You need to be clear on how the program is supposed to properly process its input.
So, again, if I enter the string “The quick brown fox jumps” what is this program supposed to print out in response?
Junilu Lacar wrote:Also, you never answered my question: If the user enters “The quick brown fox jumps” what should the program output be?
Jumps over the lazy dog.
That makes no sense at all. If the program is supposed to separate vowels and consonants, how is “Jumps over the lazy dog” the correct output if the user enters “The quick brown fox jumps” as the input string?
Stop thinking about how to write a Java program for a minute and think about how you would solve this problem by hand first. If you can’t articulate how you’d do it by hand, then how in the world would you be able to tell the computer what to do?