96.0k views
0 votes
LAB: Formatted output: Hello World! Write a program that outputs "Hello World!" For ALL labs, end with newline (unless otherwise stated) LAB ACTIVITY 1.15.1: LAB. Formatted output: Hello World! 0/10 LabProgram.java Load default template OY WN 1 public class LabProgram { public static void main(String[] args) { /* Type your code here. */ 4 3 5 6

1 Answer

3 votes

Answer:

public class LabProgram {

public static void main(String[] args) {

System.out.println("Hello World!"); } }

Step-by-step explanation:

In this statement: System.out.println

System is a class in JAVA language package

out is a member of class System

println() is a functionT to print or display message to a console or file

So the message to print here is Hello World!

Now this statement System.out.println prints the message "Hello World!" passed in the argument.

Hence this statement as a whole displays the message Hello World! on the output screen.

User Amirash
by
5.3k points