高手请进,这里有个简单的问题,但我完全没头绪

zhoudiyao 2012-10-08 09:24:25
for(Iterator(Article) it = articles.iterator();it.hasNext();){
Article a = it.next();
%>

<tr class="jive-even">
<td class="jive-first" nowrap="nowrap" width="1%"><div class="jive-bullet"> <img src="images/read-16x16.gif" alt="已读" border="0" height="16" width="16">
<!-- div-->
</div></td>
<td nowrap="nowrap" width="1%"> 




 </td>
<td class="jive-thread-name" width="95%"><a id="jive-thread-1" href="http://bbs.chinajavaworld.com/thread.jspa?threadID=744236&tstart=25">初学java遇一难题!!望大家能帮忙一下 谢谢了</a></td>
<td class="jive-author" nowrap="nowrap" width="1%"><span class=""> <a href="http://bbs.chinajavaworld.com/profile.jspa?userID=226030">fei870407</a> </span></td>
<td class="jive-view-count" width="1%"> 104</td>
<td class="jive-msg-count" width="1%"> 5</td>
<td class="jive-last" nowrap="nowrap" width="1%"><div class="jive-last-post"> 2007-9-13 上午9:31 <br>
by: <a href="http://bbs.chinajavaworld.com/thread.jspa?messageID=780182#780182" title="jingjiangjun" style="">jingjiangjun »</a> </div></td>
</tr>
<tr class="jive-odd">
<td class="jive-first" nowrap="nowrap" width="1%"><div class="jive-bullet"> <img src="images/read-16x16.gif" alt="已读" border="0" height="16" width="16">
<!-- div-->
</div></td>
<td nowrap="nowrap" width="1%"> 




 </td>
<td class="jive-thread-name" width="95%"><a id="jive-thread-2" href="http://bbs.chinajavaworld.com/thread.jspa?threadID=744234&tstart=25">请 兄弟们指点下那里 错误,,,</a></td>
<td class="jive-author" nowrap="nowrap" width="1%"><span class=""> <a href="http://bbs.chinajavaworld.com/profile.jspa?userID=226028">403783154</a> </span></td>
<td class="jive-view-count" width="1%"> 52</td>
<td class="jive-msg-count" width="1%"> 2</td>
<td class="jive-last" nowrap="nowrap" width="1%"><div class="jive-last-post"> 2007-9-13 上午8:40 <br>
by: <a href="http://bbs.chinajavaworld.com/thread.jspa?messageID=780172#780172" title="downing114" style="">downing114 »</a> </div></td>
</tr>
<%
}

红色字是错误的部分,错误提示:Syntax error on token "it", delete this token
请问这个是什么错误。。。
...全文
102 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
MiceRice 2012-10-08
  • 打赏
  • 举报
回复
你用了泛型?泛型应该是 <> 而不是 ()

for(Iterator(Article) it = articles.iterator();it.hasNext();){

修改为:

for(Iterator<Article> it = articles.iterator();it.hasNext();){

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧