Skip to main content

How to Display Text on Monitor

In the case of competitive programming, we need to read some input from keyboard, do some process with them, and display the result on the monitor.


To display text on monitor, you have to use System.out.println() function.

For example, if you want to display "Hello World" on monitor, the program will be as follows :



If you run the program, the output will be,



The function displays the any text / string that is written inside the double quotation marks.
 
Now you can display anything on the monitor.

We will discuss the above function clearly once we learn the the concept of classes.

Practice is the most important thing while learning any programming language !



NEXT

Comments