This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A EL Question

 
karmot ditt
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

Anyone out there know the correct answer for the follow question (I have modify it a litte bit from Enthuware QID:1077419390651):

<%
request.setAttribute(�names�, new String[]{�1�,�2�,�3"});
request.setAttribute(�index�,�2�);
%>
<h1><% -- insert code here --%><h1>
Which of the following statements will print "3" in inserted in the above JSP page?

Select 3 correct options
a. ${names.2 }
b. ${names [�2�]}
c. ${names.index }
d. ${names[index]}
e. ${names} [index]
f. ${names.(names.index)}
g. ${names[names[index-1]]}

Thanks,
KD.
 
Sanjay pts
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
b,d
 
Sushma Sharma
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even ${names[names[index-1]]} will print 3...
 
shiva viswanathan
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Yes thats right the consolidated answers should be b,d,g
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic