Meaning of System.out.println() method in Java

Today we will discuss the commonly used method System.out.println().
Almost every programmer who have written at least one Java application have used this for seeing the output in the console. So let discuss

 As Java is all about classes and method, clearly from the statement we can derive as below:

  • System is a class in the java.lang package.
  • out is a static member of the System class, and is an instance of java.io.PrintStream
  • println is a method of java.io.PrintStream. This method is overloaded to print message to output destination, which is typically a console or file.
Below is a Java code describing the above.

class System 
{
    public static PrintStream out;
}

class PrintStream
{
    public void println ...
}
Hope you like it. Please comment for doubts. Happy Learning !!!
SHARE

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment