VOTG
[Logo] JavaRanch » Big Moose Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Reply Bookmark it! Watch this topic JavaRanch » Forums » Professional Certification » Web Component Certification (SCWCD)
 
RSS feed
 
New topic
Author

Question regarding Expression Language

yekkala krishna
Ranch Hand

Joined: Mar 04, 2007
Messages: 38

Hi,
Can anybody explain the below question. Answer is also available.
I am not understading how ${not map.c} return true.
And also ${map.d or map.a} here there is no key with 'd' in the map.And also it is not giving any error.

11. <% java.util.Map map = new java.util.HashMap();
12. request.setAttribute("map", map);
13. map.put("a", "true");
14. map.put("b", "false");
15. map.put("c", "42"); %>
Which three EL expressions are valid and evaluate to true? (Choose three.)
A. ${not map.c}
B. ${map.d or map.a}
C. ${map.a and map.d}
D. ${map.false or map.true}
E. ${map.a and map.b or map.a}
F. ${map['true'] or map['false']}
Answer: A, B, E

Thanks in Advance....

With Regards,
Rama
Ankit Garg
Bartender

Joined: Aug 03, 2008
Messages: 6389

Yekkala please Quote Your Sources when you post a question...

SCJP 6.0 98%, SCWCD 5 98%, Javaranch SCJP FAQ, SCWCD Links
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Professional Certification » Web Component Certification (SCWCD)
 
RSS feed
 
New topic
JProfiler
Get rid of your performance problems and memory leaks!

.