Here you can find the source of readLine()
public static String readLine() throws IOException
//package com.java2s; /*/*from w w w . j a v a 2 s .c o m*/ * Copyright 2011-2016 ZXC.com All right reserved. This software is the confidential and proprietary information of * ZXC.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into with ZXC.com. */ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { private static BufferedReader consoleReader = new BufferedReader(new InputStreamReader(System.in)); public static String readLine() throws IOException { return consoleReader.readLine(); } }