import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Test {
public static void main(String args[]) throws Exception {
//BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
Scanner s = new Scanner(System.in);//和注释掉的效果一样
String str = "";
do {
System.out.println("请输入:");
//str = bf.readLine();
str = s.nextLine();//读取刚刚输入的内容,程序到这儿会停滞
if (str.length() == 0) { // 如果输入的字符串为空,则说明只输入了一个回车
System.out.println("输入的是回车!");
} else {
System.out.println("输入内容是:" + str);
}
} while (str.length() != 0);
}
}