About Question enthuware.jwpv6.2.1063 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
harsh.sahajwani
Posts: 13
Joined: Sun Jan 20, 2013 5:58 am
Contact:

About Question enthuware.jwpv6.2.1063 :

Post by harsh.sahajwani »

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.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.1063 :

Post by admin »

Sure. The code has been modified to use java.util.ArrayList to avoid this ambiguity.

thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests