/*Copyright ElohimTov LLC*/ /* //Name: ElohimTov SolveCode - Data Types - Java Solution //Problem: HackerRank - 30 Days of Code - Data Types //Current File: ElohimTovSolve_DataTypes.(java).txt //Compile-able File: ElohimTovSolve_DataTypes.java //Date: Created 02/9/2019; 12/31/2021. //Tale: ElohimTov Solve's Solution to HackerRank.com's // Data Types problem in Java programming language. // Problem link at https://elohimtov.com/elohimtov.info. */ 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, i2; double d1, d2; String s1, s2; /* Read and save an integer, double, and String to your variables.*/ i1 = Integer.parseInt(scan.nextLine()); d1 = Double.parseDouble(scan.nextLine()); s1 = scan.nextLine(); /* Print the sum of both integer variables on a new line. */ i2 = i + i1; System.out.println(i2); /* Print the sum of the double variables on a new line. */ d2 = d + d1; System.out.println(d2); /* Concatenate and print the String variables on a new line; */ /* the 's' variable above should be printed first. */ s2 = s + s1; System.out.println(s2); scan.close(); }//ends static void main }//ends class Solution /*Copyright ElohimTov LLC*/