In this HackerRank Java BigInteger problem, we need to use Java's BigInteger class and add, multiply the huge numbers and print them on the output screen.

HackerRank Java BigInteger problem solution

HackerRank Java BigInteger problem solution

import java.math.*;
import java.util.Scanner;
public class Solution {
   public static void main(String []args){
       Scanner input = new Scanner(System.in);
       String s1,s2;
       s1=input.nextLine();
       s2=input.nextLine();
       input.close();
       System.out.println(new BigInteger(s1).add(new BigInteger(s2)));
       System.out.println(new BigInteger(s1).multiply(new BigInteger(s2)));
   }
}