What is java system.out.println – with example

system.out.println in java

Java comes up with pre-defined class to let us print strings or variable in screen. The pre-defined or build in class is system that provides a few useful methods and variables.

The whole line system.out.println is explained below:

System: System is the class provided by java that contains variables and methods.

Out: Out is system’s static variable

Println: Println is the method of system class that is used to print a given text or variable etc.

Example of using system.out.println in java

Example below shows how to print “java hello world” example by using java system.out.println.


As you run code in eclipse the system.out.println will display:

Hello World

 

Also see Java main method

Was this article helpful?

Related Articles

Leave A Comment?