posted 18 years ago
Book HFSJ
Chapter 8,Page 428
Question 6
<%
List list = new ArrayList();
list.add("a");
list.add("2");
list.add("c");
request.setAttribute("list",list);
request.setAttribute("listIdx","1");
%>
<%-- insert code here --%>
Which, inserted at line ..., are valid and evaluate to c(Choose all that apply
Options
A. ${list.2}
B. ${list[2]}
C. ${list.listIdx+1}
D. ${list[listIdx + 1]}
E. ${list['listIdx' + 1]}
F. ${list[list['listIdx']]}
The correct answer ticked was A,D,F
But option F is not working in my computer.
Is this as errata?
SCJP 5.0<br />SCWCD 1.4<br />Preparing for <b>SCEA</b>.<br /><b>"I prefer an interesting vice to a virtue that bores."</b>