Showing posts with label easy java hackerrank solutions. Show all posts
Showing posts with label easy java hackerrank solutions. Show all posts

Wednesday, December 30, 2020

Java Stdin and Stdout I HackerRank | JAVA | Solution | Easy | Color The Code



Problem : https://www.hackerrank.com/challenges/java-stdin-and-stdout-1/problem

Solution : import java.util.*;


public class Solution {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        // Complete this line
        int b = scan.nextInt();
        // Complete this line
        int c = scan.nextInt();
        
        System.out.println(a);
        // Complete this line
        System.out.println(b);
        // Complete this line
        System.out.println(c);
        
        scan.close();
    }
}

Welcome to Java! | HackerRank | Java | Easy | Solution



Problem : https://www.hackerrank.com/challenges/welcome-to-java/problem

Solution : 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.");
    }
}