BufferedReader最重要,因为有个方法public String readLine()

 1 package System输入输出;
 2 
 3 import java.io.BufferedReader;
 4 import java.io.IOException;
 5 import java.io.InputStreamReader;
 6 
 7 public class Test {
 8     public static void main(String[] args) throws IOException {
 9        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
10        System.out.print("请输入数据:");
11        String str=br.readLine();
12        System.out.println(str);
13     }
14 }
不限制长度且无乱码输入

相关文章:

  • 2021-12-09
  • 2021-04-14
  • 2021-06-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
相关资源
相似解决方案