hacker rank java 4th solution
4. Java Stdin and Stdout II
import java.util.*;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
Double d= scan.nextDouble();
String myString = scan.nextLine();
myString += scan.nextLine();
System.out.println("String: " +myString);
System.out.println("Double: " + d);
System.out.println("Int: " + i);
}
}
Comments