We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
public class Solution {
public static void main(String[] args) {
// Create a Scanner object to read input from stdin
Scanner scan = new Scanner(System.in);
// Read a full line of input and store it in the variable inputString
String inputString = scan.nextLine();
// Close the Scanner object
scan.close();
// Print "Hello, World." on the first line
System.out.println("Hello, World.");
// Print the value of inputString on the second line
System.out.println(inputString);
}
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 0: Hello, World.
You are viewing a single comment's thread. Return to all comments →
Java 8 import java.io.; import java.util.; import java.text.; import java.math.; import java.util.regex.*; import java.util.Scanner;
public class Solution { public static void main(String[] args) { // Create a Scanner object to read input from stdin Scanner scan = new Scanner(System.in);
}