
已解决问题
谷歌EyoungShieh用户在2015.01.19提交了关于“都市狂枭j**a代码求解释”的提问,欢迎大家涌跃发表自己的观点。目前共有1个回答,最后更新于2024-09-04T09:55:55。publicList<Board>findAll(){
try{
Stringsql="select*fromboardorderbyiddesc";
Connectionconn=getConnection();
PreparedStatementpstmt=conn.prepareStatement(sql);
ResultSetrs=pstmt.executeQuery();
List<Board>boardList=newArrayList<Board>();
while(***.next()){
Boardboard=createBoard(rs);
boardList.add(board);
}
returnboardList;
}catch(Exceptione){
e.printStackTrace();
thrownewRuntimeException(e);
}finally{
try{
this.close();
}catch(SQLExceptione){
e.printStackTrace();
}
}
}
第5、6、8行是什么意思
希望大家能够帮助她。详细问题描述及疑问:
publicList<Board>findAll(){
try{
Stringsql="select*fromboardorderbyiddesc";
Connectionconn=getConnection();
PreparedStatementpstmt=conn.prepareStatement(sql);
ResultSetrs=pstmt.executeQuery();
List<Board>boardList=newArrayList<Board>();
while(***.next()){
Boardboard=createBoard(rs);
boardList.add(board);
}
returnboardList;
}catch(Exceptione){
e.printStackTrace();
thrownewRuntimeException(e);
}finally{
try{
this.close();
}catch(SQLExceptione){
e.printStackTrace();
}
}
}
第5、6、8行是什么意思
期待您的答案,你就是当代的活雷锋,太感谢了 !