Solved

Inside the Main Method, Prompt the User to Enter a Word

Question 96

Essay

Inside the main method, prompt the user to enter a word that has at least five characters until the user does. After that, count how many times the letter A is in that word and output the result.
Example 1:
Enter a word > Helo
Enter a word > BLABLA
Number of As is 2
Example 2:
Enter a word > Hi
Enter a word > Mid
Enter a word > PROGRAMMINGEXAMJAVA
Number of As is 4

Correct Answer:

verifed

Verified

Scanner scan = new Scanner( System.in );...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions