Please consider the qoestion from HFSJ 1 edition mock.
Given an existing class:
Which are true about EL functions? (Choose all that apply.)
A. The MyFunctions class may NOT be used by EL because it has NOT been declared final.
B. The funct method may be used by EL because it has been declared static. C. The funct method may NOT be use by EL because the calling arguments and return value must be object references.
D. The modX method may be used by EL because it is an instance method.
E. The MyFunctions class may be used by EL even though it has a public constructor.
correct options are in bold. I wonder if E would be correct one. Because to use as a EL function , block should be declared as public and static.
i think i am badly confused.
The option B is correct because we can use the public static function to call from jsp using EL
The option E is correct because , even though the class has a no-arg public constructor , we are going to call only the static method within it . We are not going to create any instance of the class. So it is legal to use the so said class.