• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question regarding Expression Language

 
yekkala krishna
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yekkala please Quote Your Sources when you post a question...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic