The o/p is 10. But shouldn't it be 9? Is it got anything to do with Postfix or variable scoping has a role to play?
rahul.ch
0
Newbie Poster
Recommended Answers
Jump to PostThat's just how postfix works. O
n line 4 the value of x-- (10) is passed to the met method, then the value of x is decremented. In the method met, the value of the expression x-- (also 10) is evaluated. The parameter x is them decremented, but this is …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.