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());
}
}
}
相关文章
- 08-17安装percona-xtrabackup-24报错: file /etc/my.cnf from install of Percona-Server-shared-56-5.6.48-rel88.解决
- 08-17解决k8s"failed to set bridge addr: "cni0" already has an IP address different from 10.244.1.1/24"【转】
- 08-1724(java_io from keyboard)
- 08-17使用mybatis提供的各种标签方法实现动态拼接Sql。使用foreach标签实现遍历查询。比如实现select * from user where id in(1,10,24)这条sql查询语句。