⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user.java

📁 java chat java chat简易聊天室程序源代码,有很高的参考价值,能在它的基础上进行2次开发.
💻 JAVA
字号:
/* * 用户 */package chat.common;import java.io.Serializable;/** * * @author Administrator */public class User implements Serializable{    protected String userName;    protected String password;    public static User createAllUser(){        return new User("所有人","");    }    public User(String userName, String password) {        this.userName = userName;        this.password = password;    }    public String getPassword() {        return password;    }    public void setPassword(String password) {        this.password = password;    }    public String getUserName() {        return userName;    }    public void setUserName(String userName) {        this.userName = userName;    }        public String toString(){        return userName;    }    @Override    public boolean equals(Object obj) {        if (obj == null) {            return false;        }        if (getClass() != obj.getClass()) {            return false;        }        final User other = (User) obj;        if (this.userName != other.userName && (this.userName == null || !this.userName.equals(other.userName))) {            return false;        }        if (this.password != other.password && (this.password == null || !this.password.equals(other.password))) {            return false;        }        return true;    }    @Override    public int hashCode() {        int hash = 7;        hash = 89 * hash + (this.userName != null ? this.userName.hashCode() : 0);        hash = 89 * hash + (this.password != null ? this.password.hashCode() : 0);        return hash;    }                }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -