• + 0 comments

    For some reason in Java 15 the variables i, d, and s are not provided like they said. You have to include it on your own.

    Scanner user = new Scanner(System.in);
        int i = 4;
        double d = 4.0;
        String s = "HackerRank ";
    
        int z;
        double dec;
        String str;
    
        z = user.nextInt();
        dec = user.nextDouble();
        user.nextLine();
        str = user.nextLine();
    
        System.out.println(i + z);
        System.out.println(d + dec);
        System.out.println(s + str);