Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL -Question

 
deepa raj
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which about EL access operators are true?

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.

is the above statements are true or not??
 
Musab Al-Rawi
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if a property doesn't exist an exception will be thrown (PropertyNotFoundException).

there are no situations where you must use the dot operator, but there are situations where you must use the [] operator.
you can use [] in replace for the dot operator without any problems, but you can't do the opposite.
 
Amruth Puppala
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C is correct
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic