Vidyalelo
Java Programming · Q30

Operators

Programming · Java Programming · question 30

Q30

What is the result of the expression (6 + 3) * 2 in Java?

A.
12
B.
15
C.
18
Answer
D.
9

Answer: Option C

Solution

Answer: Option C
Solution:
In Java, the expression (6 + 3) * 2 follows the order of operations (parentheses, multiplication/division, and addition/subtraction). First, the addition inside the parentheses is performed, resulting in 9. Then, the multiplication is carried out, yielding a final result of 18.

Therefore, the correct answer is Option C: 18.