problem with InputStraemReader
Hello all,
I tried to run the following code.But i dont know why the o/p is not what i expect last three print statements are not getting printed...plz help me finding the solution,
import java.io.*;
public class CLReader {
public static void main( String [] args ) {
try
{
Reader in =new InputStreamReader(System.in);
BufferedReader clr = new BufferedReader(in);
while ( true )
{
System.out.println("0"+ clr.readLine());
System.out.println("Ghosts never die");
System.out.println("1"+ (char)(in.read()) );
System.out.println("2"+ (char)(in.read()) );
System.out.println("3"+ (char)(in.read()) );
System.out.println("Tomorrow never die");
}
}catch(Exception e){e.printStackTrace();}
}
}

