I agree ${foo["5"]} and $foo.[5] should be equivalent in List . Assume Map have a key which is of type String "5" then it may make a difference. but surely this is a confusing question . Better Author tell what was in there head.
Option C of question 7 is correct. If 'foo' is a Map, then the argument to the map is some object (here the string "5") that acts as the key into the map.
However, this syntax will also work for lists because EL will convert the string "5" into the integer 5 at runtime to find the index into the list.
Here is a small code example that demonstrates these two use cases.
I take this opportunity to compliment you for bringing out "HF servlets and JSP". No doubt your sleepless nights for bringing this book out have saved huge volume of midnight oil(at least for me).
:-)
Regards, Ranajit Jana
Everybody! Do the Funky Monkey! Like this tiny ad!
a bit of art, as a gift, the permaculture playing cards