• + 0 comments

    Alright, i havent been watching your tutorial before you said to watch it, thank you for reply tho, im not trying to do demagoguery, but it's working with the button run, so i assume it means that everything is correct and i'm getting values for my variables out of object System.in and it's printing out how expected, even tho it looks very ugly because of tons of variables and i could do it with the cycle, but anyways i will watch your tutorial for sure, thank you!

    Here is a different variant of how i see it suppose to work, but it's still showing runtime error when i'm trying to submit:

    import java.io.*;
    import java.util.*;
    import java.text.*;
    import java.math.*;
    import java.util.regex.*;
    
    public class Solution {
    	
        public static void main(String[] args) {
            int i = 4;
            double d = 4.0;
            String s = "HackerRank ";
    		
            Scanner scan = new Scanner(System.in);
    
    /* Declare second integer, double, and String variables. */
            int i1;
            double d1;
            String s1;
            String s2;
            String s3;
            String s4;
            String s5;
            String s6;
            String s7;
            String s8;
            String s9;
            String s10;
            
            /* Read and save an integer, double, and String to your variables.*/
            i1 = scan.nextInt();
            d1 = scan.nextDouble();
            s1 = scan.next();
            s2 = scan.next();
            s3 = scan.next();
            s4 = scan.next();
            s5 = scan.next();
            s6 = scan.next();
            s7 = scan.next();
            s8 = scan.next();
            s9 = scan.next();
            s10 = s1 +" "+ s2 +" "+ s3 +" "+ s4 +" "+ s5 +" "+ s6 +" "+ s7 +" "+ s8 +" "+ s9;
            
            /* Print the sum of both integer variables on a new line. */
            System.out.println(i + i1);
    
            /* Print the sum of the double variables on a new line. */
            System.out.println(d + d1);
            
            /* Concatenate and print the String variables on a new line; 
            	the 's' variable above should be printed first. */
            System.out.println(s + s10);
    
    scan.close();
        }
    }