应用JavaBean实现管理员登录

 package bean;


public class login {
private String loginName=null;
private String password=null;
public  void   login()
{}
public String getloginName() {return loginName;}

public void setloginName(String loginName) {this.loginName = loginName;}

public String getpassword() {return password;}

public void setpassword(String password) {this.password = password;}

public  boolean check()
{
if("sunqian".equals(loginName)&&"sq".equals(password))
     return true;
   else
   return false;
}
}

相关内容推荐

返回
顶部