public Boolean validateLogin(String user, String password) {
Boolean count = false;
String sql = "select Id from student where Id = '" + password + "'";
SQLcontent S = new SQLcontent();
Statement sc = null;
try {
sc = S.sqlcontent().createStatement();
} catch (SQLException throwables) {
throwables.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
ResultSet rs = null;
try {
rs = sc.executeQuery(sql);
if (rs.next())
count = true;
} catch (SQLException throwables) {
throwables.printStackTrace();
}
return count;
}
为什么返回值一直是空null啊....