Hello coders, today we are going to solve Welcome to Java! HackerRank Solution.
Problem
Welcome to the world of Java! In this challenge, we practice printing to stdout.
The code stubs in your editor declare a Solution class and a main method. Complete the main method by copying the two lines of code below and pasting them inside the body of your main method.
System.out.println("Hello, World.");
System.out.println("Hello, Java.");
Input Format
There is no input for this challenge.
Output Format
You must print two lines of output:
- Print Hello, World. on the first line.
- Print Hello, Java. on the second line.
Sample Output
Hello, World.
Hello, Java.
Solution – Welcome to Java!
public class Solution { public static void main(String[] args) { /* Enter your code here. Print output to STDOUT. Your class should be named Solution. */ System.out.println("Hello, World.\nHello, Java."); } }
Disclaimer: The above Problem ( Welcome to Java! ) is generated by Hacker Rank but the Solution is Provided by CodingBroz. This tutorial is only for Educational and Learning Purpose.
print In(“Hello, World.\n Hello, Java.”);
Bro all Java answers are accurate with no errors or is there any errors, I want to know