Explain System.out.println()
The
System class contains several useful class fields and methods. It cannot be instantiated(Private Constructor). It is a final class.A
PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently. err ==> The "standard" error output stream.
in ==> The "standard" input stream.
out ==> The "standard" output stream.
All the three fields final and returns PrintStream.
* Unlike other output streams, a
PrintStream never throws an IOException;* Optionally, a
PrintStream can be created so as to flush automatically; this means that the flush method is automatically invoked after a byte array is written, one of the println methods is invoked, or a newline character or byte ('\n') is written.All characters printed by a
PrintStream are converted into bytes using the platform's default character encoding.print() and println() are methods of PrintStream class.
0 Comments:
Post a Comment
<< Home