Explain about "System.out.println()"

How many times have we used System.out.println till now? It is one of the most number of times compiled statement in the history of java. We shortly call it SOP.

Not only the novices but also a few Programmers do not aware of the meaning of System.out.prinltn() statement. Following is the description of each word in the statement.









What is System.out.println()?

  1. out is an object PrintStream class defined in System class. out is declared as public, static and final.
  2. println() is a method of PrintStream class.
  3. The println() method is called with out object.
  4. The out object is called with System class.
To say simple, println() is a method of PrintStream class. out is an object of PrintStream class defined in System class.
"out" in printstream class can be called without creating object of system class because it is declared as static.

System – is a final class in java.lang package:
As per javadoc, Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined properties and environment variables; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.

Comments

Popular posts from this blog

FC Barcelona vs Real Madrid -El Clasico Rivalry.

1NF,2NF, 3NF Normalization

Memory Management (Contiguous and Non-Contiguous ).