Skip to content

Instantly share code, notes, and snippets.

@oguzoldev
Created August 14, 2017 21:58
Show Gist options
  • Save oguzoldev/03c9f21d97cda59ba3a3b5939f063c8f to your computer and use it in GitHub Desktop.
Save oguzoldev/03c9f21d97cda59ba3a3b5939f063c8f to your computer and use it in GitHub Desktop.

Day 0: Hello, World.

https://www.hackerrank.com/challenges/30-hello-world/problem

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 from stdin and save it to our variable, inputString.
		String inputString = scan.nextLine(); 

		// Close the scanner object, because we've finished reading 
		// all of the input from stdin needed for this challenge.
		scan.close(); 
      
		// Print a string literal saying "Hello, World." to stdout.
		System.out.println("Hello, World.");
      
		// TODO: Write a line of code here that prints the contents of inputString to stdout.
		System.out.println("Welcome to 30 Days of Code!");
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment