138k views
1 vote
Assume the availability of a class named Arithmetic that provides a static method, add, that accepts two int arguments and returns their sum. Two int variables, euroSales and asiaSales, have already been declared and initialized. Another int variable, eurasiaSales, has already been declared. Write a statement that calls add to compute the sum of euroSales and asiaSales and that stores this value in eurasiaSales.

User Adedoy
by
8.0k points

1 Answer

7 votes

Answer:

The following statement are:

eurasiaSales = Arithmetic.add(euroSales, asiaSales);

Explanation:

Firstly we define the class "Arithmetic", then set the static type function "add()" and pass two integer type "euroSales" and "asiaSales" which returns their sum after that set another integer type variable "eurasiaSales" which stores an output of the function "add()".

The following statement are true.

User Vladi Gubler
by
8.4k points