import java.io.*;
public class StandardIO {
public static void main(String[] args) {
BufferedReader in;
BufferedWriter out;
String s = "";
try {
System.out.print("input: ");
in = new BufferedReader(
new InputStreamReader(System.in));
s = in.readLine();
out = new BufferedWriter(
new OutputStreamWriter(System.out));
out.write("got: " + s + "\n");
out.flush();
}
catch(IOException e) {
System.out.println("error: " + e);
}
}
}
StandardIO.java output
input: test input
got: test input
Tag: Study Code Program Java
No comments:
Post a Comment