import java.io.*;//调用io包
public class SimpleCharInOut
{
 public static void main(String args[])
  {
    char ch=' ';//定义个字符ch初始为‘ ’
    System.out.println(" Enter a character please");//在屏幕上输出Enter a character please
     try {//你要监视的程式码放在 try 区块里即可。在 try 区块之后紧接著在 catch 子句里指定你希望捕捉的例外型态 
        ch=(char)System.in.read();//将从键盘输入的字符赋给ch
      }
    catch(IOException e) //如果上面的代码有错误,这里就捕获
      {    } ;//错误后不进行操作
System.out.println("You're entered character:" + ch);// 在屏幕上输出You're entered character:
//和ch的值
  }
}
1.读万卷书
2.行千里路
3.阅人无数