This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Element mixture  RSS feed

 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is Question I encountered during exam preparation...

The answer was given as Compile time error

<%@page language="java" %>
<%!
Vector store;
%>
<%
Enumeration en=store.elements();
While(en.hasMoreElements())
{
out.println(en.nextElement());
}
%>
<%!
Public void jspInit()
{
store=new Vector();
store.addElement("First Value");
store.addElement("Second Value");
}
%>


Can some clarify the reasoning behind the answer
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66143
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While

Public
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!