Difference between object oriented object based programming language

What is System out and println In System.out.println() ?

Answer :

  • System is a final class which is bundled in java.lang package
  • out is the reference of PrintStream class and It’s static member of System class
public final static PrintStream out = null;

 

  • println is a method of PrintStream class which bundled in java.io package which prints output
/**
     * Terminates the current line by writing	
     * the line separator string.  The line separator
     * string is defined by the system property
     * <code>line.separator</code>, and is not 
     * necessarily a single newline
     * character (<code>'\n'</code>).
     */
    public void println() {
        newLine();
    }

 

Leave a Reply

Your email address will not be published. Required fields are marked *