首先來看看要序列化的對(duì)象
Person.java
package com.zjut.yunfeiyang;
import java.io.Serializable;
public class Person implements Serializable{
private static final long serialVersionUID = -5434734211562785652L;
public Person() {
}
private String name;
private String password;
private String id;
private String address;
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the password
*/
public String getPassword() {
return password;
}
/**
* @param password the password to set
*/
public void setPassword(String password) {
this.password = password;
}
/**
* @return the id
*/
相關(guān)推薦:
等考二級(jí)JAVA:Java+Flex整合應(yīng)用簡(jiǎn)單示例 等考二級(jí)JAVA:struts+spring實(shí)現(xiàn)的登陸實(shí)例源碼 考試吧:2010年上半年計(jì)算機(jī)等級(jí)考試備考專題