11.Evaluate the following Java expressions, assuming x and y are both declared as integer variables and x = 17and y = 6:
x/y+3 =
x%y*4 =
x-y/3 =
Answer: a) x / y + 3 = 17 / 6 + 3 = 2 + 3 = 5 b) x % y * 4 = 17 % 6 * 4 = 5 * 4 = 20 c) x –y / 3= 17 - 6 / 3 = 15
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments