What is the output of the following code?
int a = 10; int b = 20; int c = (a * (b + 2)) - 10-4 * ((2*2) - 6; System.out.println(c);
d
First of all, whenever you answer any question that uses parentheses to override operator precedence, check whether the number of opening parentheses matches the number of closing parentheses.
This code won't compile because the number of opening parentheses doesn't match the number of closing parentheses.