package com.lovecoding.day22.io03;

import java.io.Serializable;

//对象序列化
public class Employee implements Serializable {

    //版本
    private  long serialVersionUID = 1L;

    //静态修饰  关键

    private static Integer number;

    private String name;
    private Integer age;

    //transient瞬时
    private transient String adderss;

    public Employee(String name, Integer age, String adderss) {
        this.name = name;
        this.age = age;
        this.adderss = adderss;
    }

    public static Integer getNumber() {
        return number;
    }

    public static void setNumber(Integer number) {
        Employee.number = number;
    }

    public String getName() {
        return name;
    }

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

    public Integer getAge() {
        return age;
    }

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

    public String getAdderss() {
        return adderss;
    }

    public void setAdderss(String adderss) {
        this.adderss = adderss;
    }


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