aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes again accessing map values in  EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "again accessing map values in  EL" Watch "again accessing map values in  EL" New topic
Author

again accessing map values in EL

geeta vemula
Ranch Hand

Joined: Jul 18, 2008
Posts: 208
What is the output of this page? (1 correct answer)


“Hey !!”
“Hey Rihanna!!”
None of the above

answer is c.

here i thought the answer would be b since names and names[0] will give the same result that is first element. so what is the correct answer?

thanks,
geeta
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi Geeta. Here string array object was set in request scope. We have to call like this
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Your example will cause the toString() method of the array to be invoked, which returns the reference number etc.


JDBCSupport - An easy to use, light-weight JDBC framework -
geeta vemula
Ranch Hand

Joined: Jul 18, 2008
Posts: 208
oh thanks chinmaya.. actually i was confused with request parameters
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: again accessing map values in EL