Java IO Comands
Echo keyboard input.
The following program shows how the Input Stream and Buffered Readers are used to echo back a line of text typed in on the command line.
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
public class EchoLine {
public static void main(String[] args) throws IOException {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String input = br.readLine();
System.out.println( input);
}
}
|
|
To add an entry or request an existing one to be altered, please fill in the comments form
Return to Top
About Java
Main Index
(c) Compiled by B V Wood.
|
|
Main Index
UK SPONSERS
USA SPONSERS
|