File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Question regarding Expression Language Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Question regarding Expression Language" Watch "Question regarding Expression Language" New topic
Author

Question regarding Expression Language

yekkala krishna
Ranch Hand

Joined: Mar 04, 2007
Posts: 105
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
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9090

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


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
 
IntelliJ Java IDE
 
subject: Question regarding Expression Language
 
Threads others viewed
Cannot understand EL with Maps
doubt in EL
EL problem
How do you evaluate these EL expresions please and why
Regarding Expression Language
MyEclipse, The Clear Choice