24(java_io from keyboard)

public class ReadFromKB
{
public static void main(String args[])
{
try
{
byte bArray[]=new byte[128];
String str;
System.out.println("Enter something Using Keyborad:");
System.in.read(bArray);
str = new String(bArray, 0);
System.out.print("You entered:");
System.out.println(str);
}
catch(IOException ioe)
{
System.out.println(ioe.toString());
}
}
}

上一篇:Oracle数据库,数据的增、删、改、查


下一篇:mybatis与spring的整合(使用sqlSession进行crud)