What is System.out.println() in Java?
Source: Dev.to
Understanding System.out.println()
When beginners see System.out.println(), it looks long and confusing. But every part of it has a purpose. This line is not magic — it is simply Java’s way of connecting your program to the standard output system.
println() is a method
println() is a method of the PrintStream class.
PrintStream and OutputStream
PrintStream takes an OutputStream as an argument in its constructor:
PrintStream(OutputStream out)
OutputStream is an abstract class; you cannot create an object directly from it (new OutputStream()).
System class
The System class provides a PrintStream object named out. It is declared as static, so we access it using the class name (System.out).