1
visibility

What is the result of the following in Java statement?

double c;
int x, y, z;
x = 5; y = 10; z = 11;
c = x*y+z/2;
The value stored in c is:

  • 55.0

  • 55.5

  • 55

  • none

c = x * y + z / 2
⇒ c = 5 * 10 + 11 / 2
⇒ c = 5 * 10 + 5
⇒ c = 50 + 5
⇒ c = 55.0