This week's book giveaway is in the Performance forum. We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line! See this thread for details.
I wrote the following code which is not working as expected.
What I expect from this code is to print Tarun on console, but I am getting null on console. I tried to debug it and found that the String object in tosetUp() method and object in testmethod() are different. From where did this new object came? According to me the new object shouldn't come and if I am getting the flow right then I should get a NullPointer.
Can anyone please help?