发布网友 发布时间:2022-04-23 17:42
共1个回答
热心网友 时间:2023-10-11 12:20
又是你!
public static void main(String[] args) throws IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
System.out.print("请输入: ");
String line;
try {
line = br.readLine();
System.out.println("长度: " + line.length());
} catch (IOException e) {
e.printStackTrace();
} finally {
}
}