This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
But if I comment Line 1, I'm getting a null pointer?? I know the request.getAttribute("jothi") in the System.out.println(request.getAttribute("jothi")) gets a call to toString90 method but why the other throws a null pointer??
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
You are using a java1.5 feature called unboxing, which converts an Integer into an int. But you are trying to convert null into an int, which fails. It would work with Integer i = (Integer)request.getAttribute("jothi");
Maybe you'd better use SDK1.4 to practice for this exam.