Solved

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

Question 32

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents