This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Saikat Mukherjee wrote:But I think that this is absolutely possible.
Why do you think that?
No, it is not possible. Every time the method is called, there are two new variables a and b. If multiple threads call the method at the same time, each thread has its own copy of a and b, which doesn't interfere with the variables of other threads.