PrintWriter
It is
used to write any type of data to byte-oriented o/p stream as well as
char-oriented o/p stream.
When we
use constructors and methods of this class, no need to throw IOException.
We
should set flush state as true.
constructors:-
PrintWriter(OutputStream);
PrintWriter(OutputStream,boolean
flushstate);
PrintWriter(Writer);
PrintWriter(Writer,boolean
flushstate);
methods:-
public void print(int); //(for all data types)
public void print(String);
public void print(Object);
public void println(int); //(for all data types)
public void println(String);
public void println(Object);
No comments:
Post a Comment