Java BufferedReader Read Line readLine(String s)

Here you can find the source of readLine(String s)

Description

read Line

License

Open Source License

Declaration

public static String readLine(String s) 

Method Source Code

//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;
    }
}

Related

  1. readLine(String filePathAndName, String encoding)
  2. readLine(String fmt, Object... args)
  3. readLine(String path)
  4. readLine(String prompt)
  5. readLine(String prompt, boolean force)
  6. readLine(String s)
  7. readLine(String value, BufferedReader procout)
  8. readLineByLine(File file, char[][] terminators, boolean keepTerminators, Consumer readLineListener)
  9. readLineFile(File file)