206k views
1 vote
Write a Java statement that accomplishes the following task: Assign the product of variables b and c to variable a.

a) a = multiply(b, c);
b) a = b * c;
c) a = b + c;
d) a = b / c;

User Kirween
by
8.1k points

1 Answer

1 vote

Final answer:

The correct Java statement for assigning the product of variables b and c to variable a is: a = b * c; which performs a multiplication operation.

Step-by-step explanation:

The correct Java statement that assigns the product of variables b and c to variable a is: a = b * c; This statement multiplies the value of variable b with variable c and assigns the result to variable a. This performs an arithmetic multiplication operation and is the standard way to calculate the product of two variables in Java. The other options are incorrect because they either utilize a method that is not shown to be defined (multiply(b, c)), add the variables instead of multiplying them (a = b + c;), or divide the variables (a = b / c;).

User Samy Vilar
by
7.9k points