Java Scanner Read readFromReader(Scanner scanner)

Here you can find the source of readFromReader(Scanner scanner)

Description

This method is used to read input from buffered reader.

License

LGPL

Parameter

Parameter Description
reader a parameter

Return

String

Declaration

private static String readFromReader(Scanner scanner) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.Scanner;

public class Main {
    /**/*from  www .j  a  va 2  s . c o m*/
     * This method is used to read input from buffered reader.
     * 
     * @param reader
     * @return String
         
     */
    private static String readFromReader(Scanner scanner) {
        String input;
        input = scanner.nextLine().trim();
        return input;
    }
}

Related

  1. readFile(String pathname)
  2. readFile(String project, boolean judge)
  3. readFileFully(InputStream stream)
  4. readFileToList(File file)
  5. readFileWithoutComments(File input)
  6. readFromScanner(Scanner scanner)
  7. readInt(String prompt)
  8. readLine(String format, Object... args)
  9. readMatrix(Scanner in, int n)