Read this in a post related to Constants returned from Class Tag methods..
public static final int EVAL_BODY_AGAIN = 2 public static final int EVAL_BODY_BUFFERED = 2
both are having value 2 so practically doStartTag can return EVAL_BODY_AGAIN
My Ques. Are we supposed to know what is the integer value for each of the constants returned = such that if two constants have same value these can be interchanged??? . If so, can someone list all the constant and their mapped integer values over here...
/** Code speaks louder than words */
posted 10 years ago
I think though the integer values of the constants are same, they are used the return value of the different methods.
The doStartTag can return the EVAL_BODY_BUFFERED and the doAfterBody can return the EVAL_BODY_AGAIN. So, no problem of same values. I think the constants have given to descriptive names to identify the purpose. As these are compile time constants, you can use the direct value, instead of these constants.
For the Exam You do not have to know the value of these constants.