Hi there,
following is a code to display the messages entered by a user in the keyboard.
import java.io.*;
public class InputTranslator
{
public static void main(
String args[]) throws IOException
{
BufferedReader inStream = new BufferedReader(new InputStreamReader(System.in));
String inputLine;
do
{
System.out.println(">");
System.out.flush();
inputLine=inStream.readLine();
System.out.println("your message is:" +inputLine);
}while(inputLine.length()!=0);
}
}
In this program, even if I comment the line System.out.flush(), I couldn't find the difference in the output.
I exactly want to know what is happening in that statement.
thanks in advance.
sasiantony.