Package java.io
Class PrintWriter
void println()
void println(boolean bool)
void println(char ch)
void println(char[] charArray)
void println(float fnum)
void println(int inum)
void println(Object obj)
void println(String str)
_INSERT_METHOD_SIGNATURE_HERE_
Description:
println() method:
This method terminates the current line by writing a line sepatator string.
println(boolean bool) method:
This method prints a boolean value and terminates the line with a line terminator.
println(char ch) method:
This method prints a character and terminates the line with a line terminator.
println(char[] charArray) method:
This method prints a character array and terminates the print operation with a line terminator.
println(float fnum) method:
This method prints a floating point number and terminates the line with a line terminator.
println(int inum) method:
This method prints an integer number and terminates the line with a line terminator.
println(Object obj) method:
This method prints an object and terminates the line with a line terminator.
println(String str) method:
This method prints a string and terminates the line with a line termiantor.
Example
File file = new File("testFile");
String fileString = "Hello World";
OutputStream fos = new FileOutputStream(file);
PrintWriter pw = new PrintWriter(fos);
...
pw.println(fileString);
The example above prints the specified string to the file.