从屏幕中输入字符串的方法

来源:互联网 发布:java 审批流程框架 编辑:程序博客网 时间:2024/05/17 09:31
 String str="";
  System.out.println("请输入一个字符串!");
  BufferedReader in = new BufferedReader(new InputStreamReader(System.in) );
  try{
   str=in.readLine();
  }catch(IOException e){
   System.out.println("IOException");
  }
原创粉丝点击