HackerRank/JAVA

Welcome to Java!

예쁜꽃이피었으면 2024. 1. 12. 08:49

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

 

Welcome to Java! | HackerRank

Practice printing to stdout.

www.hackerrank.com

 
 
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.");
    System.out.println("Hello, Java.");
        
    }
}
더보기

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, J

 

 

 

반응형

'HackerRank > JAVA' 카테고리의 다른 글

Java Loops I  (0) 2024.01.12
Java Output Formatting  (0) 2024.01.12
Java Stdin and Stdout II  (0) 2024.01.12
Java If-Else  (0) 2024.01.12
Java Stdin and Stdout I  (0) 2024.01.12