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.