遍历你的ResultSet即可
while(rs.next()) {
user.setId(rs.getInt("id"));
user.setUsername(rs.getString("username"));
user.setPassword(rs.getString("password"));
}
都return list吗?
直接遍历list就可以了
for(int i=0;i
}
void function (List result){
for(int i=0;i
User user = result.get(i);
System.out.println("id=" + user.getId() + ";username=" + user.getUserName()+ "userpsw="+ user.getUserPsw());
}
}
如上,循环输入就ok了吧.