Here you can find the source of readLine(String s)
public static String readLine(String s)
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 EURA NOVA.//from w ww . ja v a2 s. co m * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v2.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * Aldemar Reynaga - initial API and implementation * Salim Jouili - initial API and implementation ******************************************************************************/ import java.io.BufferedReader; import java.io.IOException; public class Main { static BufferedReader bufRead; public static String readLine(String s) { System.out.print(s); String returnval = null; try { returnval = bufRead.readLine(); } catch (IOException e) { e.printStackTrace(); } return returnval; } }