Here you can find the source of readLine()
private static String readLine()
//package com.java2s; //License from project: Creative Commons License import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { private static String readLine() { String string = ""; InputStreamReader input = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(input); // read in user input try {//from ww w . j a v a 2s . c o m string = reader.readLine(); } catch (Exception e) { e.printStackTrace(); } return string; } }