The PrintHello class demonstrates printing text to the console.
You will notice that the line, System.out.println("Hello, I am learning Java!"); is responsible for printing the text.
This line is written inside the main method.
Please note that in Java, String literals (i.e. text) must be enclosed in double quotes.
In our case you will notice that the String literal Hello, I am learning Java! is enclosed in double quotes.
See the code and retype the same code.
package q10761 :-
0 Comments