Hello World 1
This is a program to learn console output with and without newline.
To learn java concepts related to :
- Difference between print() and println() method for showing the output to console.
The objective is to demonstrate console output using multiple print or println methods.
Since we want that the second output should come adjacent to the first one we will use theprint() method in the first statement but in the second statement we will use println() as we want the other outputs to be displayed in the next line.
In this statement we have not used println() method, instead we have used print() as we want the next output to be displayed in the same line.
In this statement we have used the method println() as we want the other outputs to be displayed in the next line.
Suggested Filename(s): HelloWorld1.java
admin| Created: 13-Aug-2016 | Updated: 8-Dec-2017|