Answers

Question and Answer:

  Home  Java Classes

⟩ In System.out.println() explain it.My doubt, we call static method with Class name but here what is "out"?

Actually System is class define in java.lang package...

class System{ //Member variables... static PrintStream out;

.................................

//Member methods...

.................

}

so out is a static reference of PrintStream class,which is define in java.io package and println() is a method of PrintStream class...

So ultimately, we can call println() method of static out reference of System class.

Syste.out.println();

 186 views

More Questions for you: