1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
elena-s [515]
2 years ago
15

Given two Strings String s1 = "11223351638791377189728193"; String s2 = "983763978669976862724569282405742578"; and String varia

ble s3. Write a piece of code so that s3 refers to a String whose integer value will be the product of integer values of s1 and s2. Java.
Computers and Technology
1 answer:
inn [45]2 years ago
7 0

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);  

}  

}  

You might be interested in
A computer system has 9,850 processes and 172 of them were suspended while 276 of them were terminated. Explain why some of the
Mrrafil [7]

Answer:

Check below for answers and explanations.

Explanation:

The major reasons why computer processes are suspended or terminated are:

1. When there is insufficient memory for successful completion of the process

2. When there's an unauthorized access of any of the computer resources by the process.

It is possible that some processes are terminated why some are suspended because, when the system runs out of memory, the running processes are put on hold until the system is able to create free memory space for the completion of the process. In this case the process is suspended. But if the system cannot provide enough space for the process, the process is terminated.

In the example provided in this exercise, some of the processes were suspended because the system wants to create free memory space for their completion while others are terminated either because the available space is not sufficient for their completion or they want to access an unauthorized resources on the system.

4 0
2 years ago
HOW CAN YOU GET THE COOLEST FONTS ON GOGGLE SLIDES???
Viefleur [7K]
I would love to help. but if you could text my number i could help more. i have a chromebook
8 0
2 years ago
Read 2 more answers
To quickly save a file, use the keyboard shortcut ________. ctrtl shift s ctrl s ctrl a ctrl shift-a
Advocard [28]
You have to use control + s only. but if you want to save it in different format, use control + shift + S
3 0
2 years ago
A voltage measurement error is caused by the integration time window of a digital volt-meter. This is a _____________error.
gladu [14]

Answer: Systematic error

Explanation:

  The systematic error is the type of error which is basically caused due to the integration time of the digital volt meter in the voltage error measurement.

It is one of the type of error that occur during the measurement of the voltage due to mismatch start channel. It basically result into the difference between the fall and rise in channel and the difference in the propagation delay.

The systematic error is basically introduce by interconnect different types of cable and setting the triggering level in the system. This type of error are constant in the given measurement configuration process.

4 0
3 years ago
Dwayne Alexander is working on a project promoting a fictitious product for his marketing class. He wants to use animation to sh
erastova [34]

The following are examples of animation apps:

  • Toon Boom Animation (2-D)
  • Prisma3D (3-D) and
  • AnimeTok (3-D)

<h3>What are the Pros and the cons of each app listed above?</h3>

Toon Boom Animation Pros:

  • It has a great set of tools
  • It has camera angles functionality
  • Has a vector drawing tool

Cons:

  • It is expensive.

Prisma3D (3-D) Pros:

  • It is good for modeling;
  • Easy to use interface

Cons:

  • It has too many bugs.
  • lacks sculpting tools

AnimeTok (3-D) Pros:

  • It makes it easy to move the characters easily
  • It is easy to understand

Cons:

  • It has too many ads
  • does not have an undo and redo button

Learn more about Animation Apps at:
brainly.com/question/7279789

6 0
1 year ago
Other questions:
  • What should every Software Engineer know about Software Architecture?
    6·1 answer
  • Aria has modified the hard disk that hosts the operating system by using the fdisk command. The fdisk command indicates that the
    8·1 answer
  • If you don't know whether to write too, two, or to, you should use the spell-checker to help you decide. true or false?
    7·1 answer
  • Which of the following documents cannot be created using the Microsoft® Word® application?
    5·2 answers
  • The definition of network is:
    10·1 answer
  • 1. Name the first PC virus.<br> 2. In which language are viruses written for Microsoft programs?
    8·2 answers
  • Write a recursive function that returns 1 if an array of size n is in sorted order and 0 otherwise. Note: If array a stores 3, 6
    13·1 answer
  • Describe accessibility in Windows 7 ​
    13·1 answer
  • An online retailer has developed an algorithm to provide personalized recommendations to shoppers. Which form of IPR protects th
    7·1 answer
  • Utilizando o padrão de medidas e unidades do National Institute of Standards and Technology, em que 1 KB é igual a 1.000 Bytes,
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!