java hosting


JavaRanch's SCWCD Mock Exam

This mock exam is provided to aid people in the preparation for the SCWCD Exam. While the questions are hopefully of similar content, every effort has been made to ensure no question from the real exam is contained herein.

Question Bank ID : 21     Choose the 1 correct answer
Which of the following is an example of a correctly formed conditional statement 
in jsp?
<%
Enumeration names = request.getParameterNames();
 while(names.hasMoreElements())
   { 
      <tr>
       <td>
         out.print(request.getParameter((String)names.nextElement());
       </td>
      </tr>
   } %>
<%@ jsp:if condition="<%= session.isNew() %>">
<h2>Hello</h2>
</jsp:if>
<% if(session.isNew())
      out.print("Hello");
%>
<%
Enumeration names = request.getParameterNames();%>
<% jsp:while(names.hasMoreElements())
   { %>

      <tr>
       <td>
         <%= request.getParameter((String)names.nextElement()) %>
       </td>
      </tr>

 <% } %>

Return to Start

JSP pages and Beans developed by Carl Trusiak
Questions developed and maintained by :
Tony Alicea
Frank Carver
Peter den Haan
Carl Trusiak
Christophe Verré
Paul Wheaton
Ken Zrobok