The answer to this question is correct - "None of these will work". But the reason should be that the Jsp will not compile, because there is no import statement written in the JSP to import ArrayList. And it is not asked to be assumed in the question. There should be the following statement in the jsp for it to be able to compile first:
<%@ page import="java.util.*" %>
Currently the question only states JSP as:
<%
ArrayList cities = new ArrayList();
cities.add("NYC");
cities.add("SFO");
%>
Once the page compiles, only after that we can talk about what would be the result of the JSP. And after that the rest of the explanation is also correct.
About Question enthuware.jwpv6.2.1063 :
Moderators: Site Manager, fjwalraven
-
- Posts: 13
- Joined: Sun Jan 20, 2013 5:58 am
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.jwpv6.2.1063 :
Sure. The code has been modified to use java.util.ArrayList to avoid this ambiguity.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 4 guests