InputStreamReaderにSystem.inを指定してnewすると、console inputとなる
public class Outer {
public static void main(String[] args) {
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader bs = new BufferedReader(is);
try{
try(bs) {
String s = bs.readLine();
System.out.println(s);
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
ppp //me typed
ppp //show in console