Name: el35337 Date: 01/03/97
/*
This program generates:
IOException: null
java.io.IOException
at
java.io.BufferedInputStream.available(BufferedInputStream.java:181)
at java.io.InputStreamReader.fill(InputStreamReader.java:216)
at java.io.InputStreamReader.read(InputStreamReader.java:273)
at java.io.BufferedReader.fill(BufferedReader.java:141)
at java.io.BufferedReader.readLine(BufferedReader.java:213)
at example.main(example.java:11)
JDK1.1 on NT
*/
/**
* @author Jeffrey Kutcher
*/
import java.io.*;
class example {
public static void main(String[] args) {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String s;
try {
s = br.readLine();
} catch(IOException e) {
System.err.println("IOException: " + e.getMessage());
e.printStackTrace();
return;
}
System.out.println("s='" + s + "'");
}
} ###@###.###
======================================================================
- duplicates
-
JDK-4023791 InputStreamReader does not work on the Win32 console input stream
-
- Closed
-