You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
460 B
20 lines
460 B
package 第03期.mca_07;
|
|
|
|
import java.io.BufferedReader;
|
|
import java.io.IOException;
|
|
import java.io.InputStreamReader;
|
|
|
|
public class ReadLine {
|
|
|
|
public static void main(String[] args) throws IOException {
|
|
System.out.println("请输入文本");
|
|
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
|
|
String line = null;
|
|
while ((line = in.readLine()) != null) {
|
|
System.out.println(line);
|
|
}
|
|
in.close();
|
|
}
|
|
|
|
}
|