请问怎么接收键盘输入啊?
我是一个刚刚学习JAVA的小虾.对于JAVA中的接收键盘输入我到现在还不知道!
去想一定是有很多方法的!希望大哥大姐帮我解解难!
我自己写了一个,可是不对,收到的数据根本就不是我输入的!
代码如下:
try
{
this.year=(int)System.in.read() ;
this.month=(int)System.in.read();
this.datatime=(int)System.in.read();
}
catch (IOException e)
{
System.out.println(e.getMessage());
}