declare bufferedreader java

Java
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
Source

Also in Java: