Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35317

Syntax error on token "taskTEList", VariableDeclaratorId expected after this token

From parmenides <xparmenides@yahoo.com>
Newsgroups comp.lang.java.programmer
Subject Syntax error on token "taskTEList", VariableDeclaratorId expected after this token
Date 2016-08-14 14:29 +0800
Organization Aioe.org NNTP Server
Message-ID <nop34r$1f19$1@gioia.aioe.org> (permalink)

Show all headers | View raw


Hi,

In a JSP page, the following code:

<%
...
ArrayList<TaskTableEntry> taskTEList;
@SuppressWarnings("unchecked")
taskTEList = (ArrayList<TaskTableEntry>)session.getAttribute("taskTEList");
...
%>

will result in compilling error:

Syntax error on token "taskTEList", VariableDeclaratorId expected after 
this token

But, by modifing the code as:

<%
...
@SuppressWarnings("unchecked")
ArrayList<TaskTableEntry> taskTEList = 
(ArrayList<TaskTableEntry>)session.getAttribute("taskTEList");
...
%>

there is no the above error message at all. Why?

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Syntax error on token "taskTEList", VariableDeclaratorId expected after this token parmenides <xparmenides@yahoo.com> - 2016-08-14 14:29 +0800
  Re: Syntax error on token "taskTEList", VariableDeclaratorId expected after this token Lew <lewbloch@gmail.com> - 2016-08-14 12:50 -0700

csiph-web