Oracle
1Z0-899 · Question #23
Which three EL expressions, inserted at line 15, are valid and evaluate to "3"? (Choose three) 11. <% 12. request.setAttribute ("vals", new String[] {"1", "2", "3", "4"}); 13. request.setAttribute…
The correct answer is B. ${vals ["2"] } D. ${vals[index] } G. ${vals [vals[index-1]] }. See the full explanation below for the reasoning.
Question
Which three EL expressions, inserted at line 15, are valid and evaluate to "3"? (Choose three) 11. <% 12. request.setAttribute ("vals", new String[] {"1", "2", "3", "4"}); 13. request.setAttribute ("index", "2"); 14. %> 15. <% - - insert code here - - %>
Options
- A${vals.2}
- B${vals ["2"] }
- C${vals.index}
- D${vals[index] }
- E${vals} [index]
- F${vals. (vals.index) }
- G${vals [vals[index-1]] }
How the community answered
(57 responses)- A12% (7)
- B75% (43)
- C2% (1)
- E7% (4)
- F4% (2)
Community Discussion
No community discussion yet for this question.