1.
public Object getData(ResultSet rs)throws SQLException{
if(!rs.next()) return null;
article.setArticleID(rs.getInt("articleID"));
article.setAuthor(rs.getString("author"));
article.setBoardID(rs.getInt("boardID"));
article.setContent(rs.getString("content"));
article.setPostTime(rs.getString("postTime"));
article.setTitle(rs.getString("title"));
article.setVisitNumber(rs.getInt("visitNumber"));
article.setRenumber(rs.getInt("reNumber"));
list.add(article);//---------------!!
}
return list;//-------------------------!!2.
public Object getData(ResultSet rs)throws SQLException{
if(!rs.next()) return null;
article.setArticleID(rs.getInt("articleID"));
article.setAuthor(rs.getString("author"));
article.setBoardID(rs.getInt("boardID"));
article.setContent(rs.getString("content"));
article.setPostTime(rs.getString("postTime"));
article.setTitle(rs.getString("title"));
article.setVisitNumber(rs.getInt("visitNumber"));
article.setRenumber(rs.getInt("reNumber"));
list.add(article);//---------------!!
}
return list;//-------------------------!!2.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货