Java BufferedReader Read Line readLine(String s)

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

Description

read Line

License

Apache License

Declaration

public static String readLine(String s) 

Method Source Code


//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 readLine(String s) {
        System.out.print(s);/*from  www  .  j a v a  2s  .co  m*/
        String returnval = null;
        try {
            BufferedReader bufRead = new BufferedReader(new InputStreamReader(System.in));
            returnval = bufRead.readLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        return returnval;
    }
}

Related

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