• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EL access operator

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please search the forum before asking a question. I searched for "EL access operators" and got the following:

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

which answers your question. Or alternatively:

https://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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please any one clarify
reply
    Bookmark Topic Watch Topic
  • New Topic