java可以用以下方式接收来自控制台的输入:
System.out.println("请输入第一个字符串:");//提示信息
byte[] b = new byte[1024];//数组缓冲
int n = System.in.read(b1);//读取数据
String s = new String(b,0,n);//转换为字符串
System.out.println("您输入的字符串为:",s)
1万+

被折叠的 条评论
为什么被折叠?



