Answer:
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
String s1 = "11223351638791377189728193"; String s2 = "983763978669976862724569282405742578";
BigInteger num1 = new BigInteger(s1);
BigInteger num2 = new BigInteger(s2);
BigInteger product = num1.multiply(num2);
String s3 = product.toString(10);
System.out.println(s3);
}
}
Explanation:
Because s1 and s2 contain large integers, the program need the biginteger module in other to compute the products of s1 and s2 when converted to integers.
This line initializes the two string variables s1 and s2
String s1 = "11223351638791377189728193"; String s2 = "983763978669976862724569282405742578";
The next two lines convert the two strings to BigInteger. This allows the program to multiply large integers
<em>
BigInteger a = new BigInteger(s1); </em>
<em>BigInteger b = new BigInteger(s2); </em>
<em />
This computes the product of the two big integers
BigInteger product = num1.multiply(num2);
This converts the product to String s3
String s3 = product.toString(10);
This prints s3
System.out.println(s3);
}
}