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?

That'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 irrelevant because it immedtately goes out of scope. The evaluated value (10) is then returned. Finally back on line 4 that value is assigned to x.

ps rahul - if you are satisfied with an answer / answers to ypur questons please mark the thread "solved" so others fgind it useful as well.