The New Line - Java
Submissions: 10476   Accuracy:

57.5%

  Difficulty: Easy   Marks: 2
Associated Course(s):   Fork Java

You are familiar with producing output using JAVA In this task, you'll be required to write three messages in three separate lines. Write Geeks for Geeks. But wait a minute!! You need to write each word of it in a separate line.
In the function printIndividualLine(), output each word of Geeks for Geeks in a separate line.

Hint: System.out.println() might be useful here!

Input Format:
No input

Output Format:
Geeks
for
Geeks

Example:
Output:

Geeks
for
Geeks
Explanation:
First word of the statment is in first line, next word is in next line and last is in last line.

** For More Input/Output Examples Use 'Expected Output' option **

Author: Dhiman Mayank


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.