public class LoginTest { public static void main(String[] args) { Student stu = new Student(); stu.setSid("123456"); stu.setPwd("password");

    LoginService loginService = new LoginService();
    boolean result = loginService.login(stu);
    
    if (result) {
        System.out.println("Login success");
    } else {
        System.out.println("Login failed");
    }
}

}

Override public boolean loginStudent stu ListStudent stulist = DBUtilqueryTableselect from Student where sid= ang pwd=Studentclass; if stulistsize==0 return false;