Question: Write a JAVA program that asks the user for a single character and determines whether that character is a vowel or consonant. The program

 Write a JAVA program that asks the user for a single character 

Write a JAVA program that asks the user for a single character and determines whether that character is a vowel or consonant. The program must validate that the user has entered a single character and that this single character is an alphabet letter. Some string and character methods that may be useful: Character.isAlphabetic(), s.length(), s.indexOf("st")... Sample Executions: Enter a character: ? Invalid. This is not an alphabet letter. Enter a character: abc Invalid. You entered more than one character. Enter a character: d d is a consonant letter Enter a character: o o is a vowel letter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!