package step2;import java.io.*;publicclassCatchException{publicstaticvoidmain(String[] args){
BufferedReader reader =newBufferedReader(newInputStreamReader(System.in));
String str;/********** Begin *********///补全try/catch块,异常类型为IOExceptiontry{
str = reader.readLine();int letter =0;int space =0;int number =0;int other =0;for(int i =0; i < str.length(); i ++){if(Character.isLetter(str.charAt(i))){
letter ++;}elseif(Character.isSpaceChar(str.charAt(i))){
space ++;}elseif(Character.isDigit(str.charAt(i))){
number ++;}else other ++;}
System.out.println("letter="+letter +",space="+ space +",number="+ number+",other="+other);}catch(IOException e){
e.printStackTrace();}/********** End *********/}}