You can use the Scanner class in Java to use its nextLine() method to read a line of characters entered by the keyboard. Then convert this line of characters into a character array, traverse the character array, and use the if-else statement to count the number of English letters, spaces, numbers and other characters.
Write in Java and enter a line of characters through the keyboard, and count the number of English letters, spaces, numbers and other characters...
Guess you like
Origin blog.csdn.net/weixin_35755188/article/details/129512282
Recommended
Ranking