Java Stdin and Stdout II

  • + 0 comments

    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  sw = scan.nextLine();
        String s =scan.nextLine();
        if(s!=null){
            sw=sw+s;
        }
        System.out.println("String: "+sw);
        System.out.println("Double: " + d);
        System.out.println("Int: " + i);
    }
    

    }