20.5k views
3 votes
What statement would you use to print the phrase Hello, world and then start a new line?

User Lixinso
by
6.5k points

1 Answer

7 votes

Answer:

Statement to print phrase "Hello, world" and then start a new line in java.

System.out.println("Hello, world");

Step-by-step explanation:

In java, we use "System.out.println();" statement to print any string/phrase and then start a new line.The above line will print phrase "Hello, world" and then start a new line.

Implementation in java:

// class definition

class Main

{

// main method of the class

public static void main (String[] args)

{

// statement to print phrase and start new line

System.out.println("Hello, world");

} }

User EnriqueBet
by
6.0k points