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.
the answer to that is always because you have an object reference that doesn't point to anything.
In your case, what is the value of i when you get to line 5?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Jan 07, 2013
Okay. Got it.. thanks for pointing. So if we use wrapper class, there won't be initialization done like i = 0. And is initialized to 'null' as any other object . So it cannot be used in any expressions before initializing it ! correct ?