Assuming the rest of the code is valid,
which is true about this code?
public class TestTag extends TagSupport{
public int doStartTag(){
try{
JspWriter out=pageContext.getOut();
out.println("Customize");
}//try
catch(IOException ioex){}
return(EVAL_BODY_BUFFERED);
I answered B, because I thought since EVAL_BODY_BUFFERED is not a valid return type, it would throw some run time exception.
Correct answer:
Will not compile. EVAL_BODY_BUFFERED is not a valid return type for a tag that extends TagSupport. EVAL_BODY_INCLUDE or SKIP_BODY would be ok.
How can it check @ compile time???