This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Kubernetes in Action and have Marko Luksa on-line!
See this thread for details.
Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

again accessing map values in EL  RSS feed

 
Ranch Hand
Posts: 208
  • 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
 
Ranch Hand
Posts: 437
Java Oracle
  • 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
 
Ranch Hand
Posts: 1183
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh thanks chinmaya.. actually i was confused with request parameters
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!