Java System.in wrap in BufferedReader

Description

Java System.in wrap in BufferedReader

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
  public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    String text = br.readLine();//w w  w.j  av a  2 s .  c o m
    System.out.println("You typed: " + text);

  }
}



PreviousNext

Related