📄 user.java
字号:
package com.myContent.vo;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import com.gd.jdbc.impl.GdDbCommon;
public class User {
public User() {
}
//定义变量
private int id = 0;
private String username = "";
private String password = "";
private String passwordb = "";
public void setUsername(String username) {
this.username = username;
}
public String getUsername() {
return this.username;
}
public void setPassword(String password) {
this.password = password;
}
public String getPassword() {
return this.password;
}
public void setPasswordb(String passwordb) {
this.passwordb = passwordb;
}
public String getPasswordb() {
return this.passwordb;
}
public String validate() {
String msg = "";
if (!this.password.equals(this.passwordb) && !"".equals(this.passwordb)) {
msg = "2次输入的密码必须相等";
}
if (this.password.length() < 3) {
msg = "密码长度不能小于3";
}
if ("".equals(this.username) || "".equals(this.password)) {
msg = "用户名和密码不能为空";
}
return msg;
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -