Hello,
ch is an integer variable. Why is it possible to say ch != 'x'? ch is an int and 'x' is a char.
import java.io.*;
class MyInputStream1 {
public static void main (
String args[ ]) throws IOException {
int ch;
do {
ch = System.in.read();
} while (ch != 'x');
System.out.println("Input was x; Programm termination");
}
}