import java.util.Scanner;
public class StringDemoEnd01 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入你想输入的字符串:");
String s = scanner.next();
int a = 0;
int b = 0;
int c = 0;
int d = 0;
for(int i =0;i<s.length();i++) {
//获取字符串的字符
char ch= s.charAt(i);
if(ch>='a' && ch<='z') {
a++;
}else if(ch>='A' && ch<='Z') {
b++;
}else if(ch>='0' && ch<='9') {
c++;
}else {
d++;
}
}
System.out.println("你所输入的字符串中小写字母的给数为"+a+"个");
System.out.println("你所输入的字符串中大写字母的给数为"+b+"个");
System.out.println("你所输入的字符串中数字字符的给数为"+c+"个");
System.out.println("你所输入的字符串中特殊字符的给数为"+d+"个");
}
}