Oracle
1Z0-899 · Question #118
You are writing a JSP that includes scriptlet code to declare a List variable and initializes that variable to an ArrayList object.Which two JSP code snippets can you use to import these list types?
The correct answer is C. <%@ page import='java.util.List' import='java.util.ArrayList' %> E. <%@ page import='java.util.List,java.util.ArrayList' %>. See the full explanation below for the reasoning.
Question
You are writing a JSP that includes scriptlet code to declare a List variable and initializes that variable to an ArrayList object.Which two JSP code snippets can you use to import these list types?
Options
- A<%! import java.util.*; %>
- B<%! import java.util.List; import java.util.ArrayList; %>
- C<%@ page import='java.util.List' import='java.util.ArrayList' %>
- D<%@ import types='java.util.List' types='java.util.ArrayList' %>
- E<%@ page import='java.util.List,java.util.ArrayList' %>
- F<%@ import types='java.util.List,java.util.ArrayList' %>
How the community answered
(44 responses)- A7% (3)
- B2% (1)
- C75% (33)
- D14% (6)
- F2% (1)
Community Discussion
No community discussion yet for this question.