I am trying to understand outputStream first.I am reading from the book Java network programming 2ns edition by Merlin Hughes . There is a sample program in the book which i am trying to run and get its output but there is no output.i understand it but could not identify the problem .
here is the code
import java.io.*;
public class SimpleOut
{
public static void main(String[] args) throws IOException
{
for (int i=0; i<args.length; i++)
{
println (args[i]);
}
}
public static void println(String msg) throws IOException
{
synchronized (System.out)
{
for (int i=0 ; i<msg.length(); i++)
System.out.write(msg.charAt (i) & 0xff);
System.out.write('\n');
}
System.out.flush();
}
}