• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL access operator

 
Swapna Siju
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a doubt regarding one of the mock questions in HFSJ(page 432. question 17).

Which abt EL access operators are true?

A. anywhere the . (dot) operator is used, the [] could be used instead.
D. There are some situations where the . (dot) operator must be used and other situations where the [] operator must be used.

In which the answer given is only A. I think the answer D is also correct.
The reason is:
1) We can't use ${musicList.1} instead of ${musicList["1"]
2) we can't use ${initParam.master-email} instead of
${initParam['master-email']}

Can anyone please clarify this?

Thanks and Regards
Swapna
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please search the forum before asking a question. I searched for "EL access operators" and got the following:

http://www.coderanch.com/t/171338/java-Web-Component-SCWCD/certification/EL-access-operators-HF

which answers your question. Or alternatively:

http://www.coderanch.com/t/169009/java-Web-Component-SCWCD/certification/Pg-HFS
[ May 29, 2006: Message edited by: Charles Lyons ]
 
Swapna Siju
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur reply. I searched in these links. Also, I searched in this forum. They are all discussing only abt option C. But, I couldn't find why the option D is wrong. Can anyone please clarify this.

Thanks
Swapna
 
Rodrigo Alvarez
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Options A and D are mutually exclusive:

D. There are some situations where the . (dot) operator must be used


This means that there are situations where the "." cannot be replaced with a "[]"

A. anywhere the . (dot) operator is used, the [] could be used instead.


This means that there are no situation where the "." cannot be replaced with a "[]"

Both cannot be rigth at the same time.
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Swapna Siju:
Hi all,

I have a doubt regarding one of the mock questions in HFSJ(page 432. question 17).

Which abt EL access operators are true?

A. anywhere the . (dot) operator is used, the [] could be used instead.
D. There are some situations where the . (dot) operator must be used and other situations where the [] operator must be used.

In which the answer given is only A. I think the answer D is also correct.
The reason is:
1) We can't use ${musicList.1} instead of ${musicList["1"]
2) we can't use ${initParam.master-email} instead of
${initParam['master-email']}

Can anyone please clarify this?

Thanks and Regards
Swapna



I think 'D' is also correct answer.
 
Krishna Latha Grandhi
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please any one clarify
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic