While reading about Java I/O, i realized that there are two ways through which i can write to the standard output.
Following is the snippet that uses both the techn
Using PrintWriter makes the output internationalizable - because encodings like UTF-8 can be specified. Both PrintWriter and PrintStream classes should only be used for activities like console output - not for network programming - because of their platform-dependent treatment of line-breaks and swallowing of exception conditions. The second chapter of "Java Network Programming" has a good discussion on this.