I have a query about a question in the HFSJ book
Which about EL access operators are true?
a. Anywhere the . (dot) operator is used, the [] could be used instead.
b. Anywhere the [] operator is used, the . (dot) could be used instead.
c. If the . (dot) operator is used to access a bean property but the property doesn't exist, then a runtime exception is thrown.
d. There are some situations where the . (dot) operator must be used and other situations where the [] operator must be used.
Now the answers are A + C. I chose A, C + D. It lists the reason for D not being correct as
Option D is incorrect because the dot operator can always be converted to the [] operator
Whilst it's true that the [] operator can be used for JavaBeans, Maps, Lists and Arrays. It's not true that the . (dot) operator can be used for Lists and Arrays. So there are some situations where you shouldn't use the . (dot) operator, so therefore D is a valid option. Am I right?