Online Software Educational Training - IT Tutorials - Online Education Training for Computer Software


Home

JAVA PROGRAMMING

The PrintWriter Class

PrintWriter supports the print() and println() methods for all types including Object. Thus, you can use these methods in the same way as they have been used with System.out. If an argument is not a simple type, the PrintWriter methods call the object's toString() methods and then print the result.

The following program demonstrates  using PrintWriter to handle console output:






Previous

Next