Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望能增加带字段初始化的构造方法和toString方法 #35

Open
hanger23 opened this issue Dec 31, 2021 · 1 comment
Open

Comments

@hanger23
Copy link

hanger23 commented Dec 31, 2021

示例:

public class User {

private String name;
private int age;
private String sex;

public User() {
}

public User(String name, int age, String sex) {
    this.name = name;
    this.age = age;
    this.sex = sex;
}

public String getName() {
    return name;
}

public void setName(String name) {
    this.name = name;
}

public int getAge() {
    return age;
}

public void setAge(int age) {
    this.age = age;
}

public String getSex() {
    return sex;
}

public void setSex(String sex) {
    this.sex = sex;
}

@Override
public String toString() {
    return "User{" +
            "name='" + name + '\'' +
            ", age=" + age +
            ", sex='" + sex + '\'' +
            '}';
}

}

@mars-men
Copy link
Owner

mark, 最近迭代

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants