• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

A EL Question

 
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.
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
b,d
 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
even ${names[names[index-1]]} will print 3...
 
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
 
permaculture is largely about replacing oil with people. And one tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic