public class re
{
public static void main(String args[])
{
char ch;
ch=System.in.read();
// System.out.println("Just input:"+ch);
}
}

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【sure2003】截止到2008-07-07 23:13:17的历史汇总数据(不包括此帖):
    发帖的总数量:205                      发帖的总分数:9287                     
    结贴的总数量:205                      结贴的总分数:9287                     
    无满意结贴数:2                        无满意结贴分:50                       
    未结的帖子数:0                        未结的总分数:0                        
    结贴的百分比:100.00%               结分的百分比:100.00%                  
    无满意结贴率:0.98  %               无满意结分率:0.54  %                  
    敬礼!
      

  2.   

    System.in.read();
    返回的是int 不是 char
      

  3.   

    ch = (char) System.in.read();你可以强制转化一下
      

  4.   

    public class re
    {
    public static void main(String args[]) throw IOException
    {
    Integer ch;
    ch=System.in.read();
    }
    }
    这样还不行....郁...
      

  5.   

    public class Re
    {
        public static void main(String args[]) throws IOException
        {
            Integer ch;
            ch=System.in.read();
        }
    }