go to previous page   go to home page   go to next page hear noise highlighting

Answer:

x: 100 y: 99

More Complicated Expressions

The expression on the right of the = can be complicated, as in the following fragment:

int value = 10 ;
int result = 0 ;

result = value++ * 2 ;

System.out.println("value: " + 
  value + "  result: " + result );

Avoid writing such expressions. But other programmers will write such expressions, so you need to be able to read them. You may encounter these expressions when you help other programmers debug their poorly written programs.


QUESTION 4:

What does the above fragment print out?

Click here for a


go to previous page   go to home page   go to next page