工具类(InputString)

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
public class InputString {
 
    public static String getString() throws IOException{
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        String s = br.readLine();
        return s;
    }
}
原文地址:https://www.cnblogs.com/williamxiao/p/3499950.html