GeezerVison is showing github.com — Create Welcome_to_Java!.java · ihossai4/Hackerrank@db3115f
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +29Lines changed: 29 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +/* Welcome to Java! |
| 2 | +
|
| 3 | +Welcome to the world of Java! In this challenge, we practice printing to stdout. |
| 4 | +
|
| 5 | +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 |
| 6 | +and pasting them inside the body of your main method. |
| 7 | +
|
| 8 | +System.out.println("Hello, World."); |
| 9 | +System.out.println("Hello, Java."); |
| 10 | +Input Format |
| 11 | +
|
| 12 | +There is no input for this challenge. |
| 13 | +
|
| 14 | +Output Format |
| 15 | +
|
| 16 | +You must print two lines of output: |
| 17 | +
|
| 18 | +1. Print Hello, World. on the first line. |
| 19 | +2. Print Hello, Java. on the second line. */ |
| 20 | + |
| 21 | + |
| 22 | +public class Solution { |
| 23 | + |
| 24 | + public static void main(String[] args) { |
| 25 | + /* Enter your code here. Print output to STDOUT. Your class should be named Solution. */ |
| 26 | + System.out.println("Hello, World."); |
| 27 | + System.out.println("Hello, Java."); |
| 28 | + } |
| 29 | +} |