This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Mahesh G P wrote:My query is "If variable is not initiazlied won't it be null"?
even the declaration wont be in .class file . i.e compiler removes String str; if str doesnt have assigment further lines.
So, checking str have further assignment logic in compiler may be not smart enough to prevent error that you get now ;)