File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes A EL Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "A EL Question" Watch "A EL Question" New topic

A EL Question

karmot ditt

Joined: May 25, 2005
Posts: 3
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"});
<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]]}

Sanjay pts
Ranch Hand

Joined: Nov 07, 2000
Posts: 357

Eat JAVA, Drink JAVA, Sleep Java
Sushma Sharma
Ranch Hand

Joined: Jun 02, 2005
Posts: 139
even ${names[names[index-1]]} will print 3...
shiva viswanathan
Ranch Hand

Joined: Aug 12, 2004
Posts: 152
Hi ,

Yes thats right the consolidated answers should be b,d,g
I agree. Here's the link:
subject: A EL Question
It's not a secret anymore!