Hi Parth,
These are really trick questions that you won't come across on the real exam, don't worry about them too much.
First of all: it compiles because SKIP_PAGE is defined as a
public static final int, the compiler doesn't know whether that value applies in this method
Secondly: it runs because the generated
Servlet checks only on whether the body should be skipped: see part of the generated code (on
tomcat):
The JSP2.0 spec doesn't say anything about what should be done if there is a wrong return code thrown from one the tag-methods, so I find the outcome of this question questionable.
Regards,
Frits