counting letters java

6-20) (Count the letters in a string ) Write a method  that counts the number of letters in astring  using the following header:public static int  countLetters(String  s)Write a test program  that prompts the user to enter a string  and displays the number of letters in the string , not counting numbers, spaces, or symbols. — Prompts For Keyboard/Console/Standard Input —Enter a string  of letter, numbers, spaces, and symbols:— Keyboard/Console/Standard Input stdin —Jogging 10,000 miles is probably not good. — Monitor/Console/Standard Output  —Enter a string  of letter, numbers, spaces, and symbols:The number of letters in the string  is: 29(Note: this combines standard input with standard output )>java LetterCount Enter a string  of letter, numbers, spaces, and symbols: Jogging 10,000 miles is probably not good. The number of letters in the string  is: 29— Prompts For Keyboard/Console/Standard Input —Enter a string  of letter, numbers, spaces, and symbols:— Keyboard/Console/Standard Input stdin —When C02 builds up the TEMP goes up! — Monitor/Console/Standard Output  —Enter a string  of letter, numbers, spaces, and symbols:The number of letters in the string  is: 26(Note: this combines standard input with standard output )>java LetterCount Enter a string  of letter, numbers, spaces, and symbols: When C02 builds up the TEMP goes up! The number of letters in the string  is: 26— Prompts For Keyboard/Console/Standard Input —Enter a string  of letter, numbers, spaces, and symbols:— Keyboard/Console/Standard Input stdin —500 miles is a popular walking metric for love songs, or so they say. — Monitor/Console/Standard Output  —Enter a string  of letter, numbers, spaces, and symbols:The number of letters in the string  is: 51(Note: this combines standard input with standard output )>java LetterCount Enter a string  of letter, numbers, spaces, and symbols: 500 miles is a popular walking metric for love songs, or so they say. The number of letters in the string  is: 51— Prompts For Keyboard/Console/Standard Input —Enter a string  of letter, numbers, spaces, and symbols:— Keyboard/Console/Standard Input stdin —CAPS lowercase both count !@#$%^&*( 1234567890 should not. — Monitor/Console/Standard Output  —Enter a string  of letter, numbers, spaces, and symbols:The number of letters in the string  is: 31(Note: this combines standard input with standard output )>java LetterCount Enter a string  of letter, numbers, spaces, and symbols: CAPS lowercase both count !@#$%^&*( 1234567890 should not. The number of letters in the string  is: 31compile with NetBeans

Looking for this or a Similar Assignment? Click below to Place your Order

Open chat