Here you can find the source of readLineFromConsole()
public static String readLineFromConsole()
//package com.java2s; //License from project: Apache License import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static String readLineFromConsole() { try {// w w w . j a v a 2 s . c o m BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in)); String line = bufferRead.readLine(); return line; } catch (IOException e) { e.printStackTrace(); return null; } } }