Java BufferedReader Read Line readLine()

Here you can find the source of readLine()

Description

read Line

License

Creative Commons License

Declaration

private static String readLine() 

Method Source Code


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

Related

  1. readLine()
  2. readLine()
  3. readLine()
  4. readLine()
  5. readLine()
  6. readLine()
  7. readLine()
  8. readLine(BufferedReader br)