InputStreamReader inputStreamReader = new InputStreamReader(System.in);
BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
String line = null;
try {
line = bufferedReader.readLine();
} catch (IOException exception) {
exception.printStackTrace();
} finally {
try {
bufferedReader.close();
} catch(IOException exception) {
exception.printStackTrace();
}
}