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();}

}

}

[813 byte] By [shammya] at [2007-10-2 20:35:33]
# 1
System.in doesn't allow you to detect key presses. It works on lines of text, so until you press <Enter> you won't be able to read anything from it.
YAT_Archivista at 2007-7-13 23:18:46 > top of Java-index,Java Essentials,Java Programming...