File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

again accessing map values in EL

 
geeta vemula
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 432
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Geeta. Here string array object was set in request scope. We have to call like this
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your example will cause the toString() method of the array to be invoked, which returns the reference number etc.
 
geeta vemula
Ranch Hand
Posts: 208
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh thanks chinmaya.. actually i was confused with request parameters
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic