[java] What's the meaning of System.out.println in Java?

System.out.println("Hello World");
  1. System: It is the name of standard class that contains objects that encapsulates the standard I/O devices of your system.

It is contained in the package java.lang. Since java.lang package is imported in every java program by default,therefore java.lang package is the only package in Java API which does not require an import declaration.

  1. out:The object out represents output stream(i.e Command window)and is the static data member of the class System.

So note here System.out (System -Class & out- static object i.e why its simply referred to by classname and we need not create any object).

  1. println:The println() is method of out object that takes the text string as an argument and displays it to the standard output i.e on monitor screen.

Note
System -Class
out -static Object
println() -method
Remember a function (in java function is called method) always has the format function()