PrintStream class enables you to write formatted data to an underlying OutputStream.PrintStream never throws an IOException.The PrintStream class contains format() and printf() methods.The PrintStream has a wide selection of contructors that enable you to connect it to a File, or an OutputStream.
PrintStream has the following Constructors.
PrintStreamDemo CODE import java.io.*; OUTPUT Alone we can do so little, Together we can do so much DESCRIPTION At LINE A we created a String. At LINE B we created PrintStream object. At LINE C we formated String. At LINE D we closed PrintStream.
|