public class StringDemo1 {
public static void main(String[] args) {
//判断字符串中小写字母,数字,还有其他字符的数量
String s = "efe89687.lk..";
int x = 0;//小写字母
int y = 0;//数字
int z = 0;//其他字符
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
//c>='a'&&c<='z';
if (97 <= c && c <= 122) {
x++;
//c>='0'&&c<='9'
} else if (48 <= c && c <= 57) {
y++;
} else {
z++;
}}
System.out.println("小写字母一共为" + x + "个");
System.out.println("数字一共为" + y + "个");
System.out.println("其他字符一共为" + z + "个");
}
}