一、题目描述
输入一行字符,分别统计出包含英文字母、空格、数字和其它字符的个数。
二、代码实现
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine()) {
String input = sc.nextLine();
int countChar = 0;
int countBlank = 0;
int countNumber = 0;
int countOther = 0;
for (int i=0; i