mirror of
https://github.com/Estom/notes.git
synced 2026-02-05 19:43:57 +08:00
Java内容重新整理删除过期的东西
This commit is contained in:
79
Java/JavaDemo/codedemo/java/lang/serialization/People.java
Normal file
79
Java/JavaDemo/codedemo/java/lang/serialization/People.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package cn.aofeng.demo.java.lang.serialization;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 默认序列化和
|
||||
*
|
||||
* @author <a href="mailto:aofengblog@163.com">聂勇</a>
|
||||
*/
|
||||
public class People implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 6235620243018494633L;
|
||||
|
||||
private String name;
|
||||
|
||||
private int age;
|
||||
|
||||
private transient String address;
|
||||
|
||||
private static String sTestNormal;
|
||||
|
||||
private static transient String sTestTransient;
|
||||
|
||||
public People(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public People(String name, int age) {
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public People(String name, int age, String address) {
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
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 getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getsTestNormal() {
|
||||
return sTestNormal;
|
||||
}
|
||||
|
||||
public void setsTestNormal(String sTestNormal) {
|
||||
People.sTestNormal = sTestNormal;
|
||||
}
|
||||
|
||||
public String getsTestTransient() {
|
||||
return sTestTransient;
|
||||
}
|
||||
|
||||
public void setsTestTransient(String sTestTransient) {
|
||||
People.sTestTransient = sTestTransient;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user