public class char1 {
public static void main(String[] args) {
char c=0;
System.out.print("enter a character:");
try{
c=(char)System.in.read();
}catch(IOException e){};
if (c>=65 && c<=90 || c>=97 && c<=122)
System.out.println("it is  a letter.the letter is:"+c);
else
System.out.println("it's not a letter.");
}
}
运行上面的程序,提示错误如下:
java.lang.Error: 无法解析的编译问题:
IOException 不能解析为类型 at char1.main(char1.java:10)
Exception in thread "main" 
请高手指教,谢谢!