Hi, on pg 51, of Exam Cram for
Java 2 book, on Question 1,
What will be the result of calling the following method with an input of 2?
public in adder( int N ) {
return 0.100 + N++ ;
}
choices:
a. The method will return 258.
b. The method will return 102.
c. The method will return 259.
d. The method will return 103.
On the book, the anwser for this question is a, which is 258.
I thought the N will be post incremented first because ++ has a higher precedence than +, this will make the answer be c, which is 259. Can someone explain to me?
Thanks.