FileDocCategorySizeDatePackage
PersonSerializable.javaAPI DocExample596Sun Feb 24 19:28:24 GMT 2002None

PersonSerializable.java

import java.io.*;

public class PersonSerializable implements Serializable {
    private String name;
    private String occupation;
    private char sex;
    private int age;

    public void setDetails(String name,int age,char sex,String occupation) {
        this.name = name;
        this.age = age;
        this.occupation = occupation;
        this.sex = sex;
    }
    public void displayDetails(){
        System.out.println("Name = "+name);
        System.out.println("Age = "+age);
        System.out.println("Sex= "+sex);
        System.out.println("Occupation= "+occupation);
    }
}