Algorithm


Problem Name: Welcome to Java!

Problem Link: https://www.hackerrank.com/challenges/welcome-to-java/problem?isFullScreen=true

In this HackerRank Functions in Java programming problem solution,

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:

  1. Print Hello, World. on the first line.
  2. Print Hello, Java. on the second line.

Sample Output

Hello, World.
Hello, Java.

 

 

Code Examples

#1 Code Example with Java Programming

Code - Java Programming


public class Solution{
    public static void main(String[] args) {
        System.out.println("Hello, World.");
        System.out.println("Hello, Java.");
    }
}
Copy The Code & Try With Live Editor
Advertisements

Demonstration


Previous
[Solved] Bit Array in C++ solution in Hackerrank - Hacerrank solution C++
Next
[Solved] Java Stdin and Stdout I in Java solution in Hackerrank - Hacerrank solution Java