// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.*;

public class Deser2 {
    public static void main(String[] args) throws Exception {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("../x.ser"));
        X o = (X)ois.readObject();
        System.out.println(o.getF());
        ois.close();
    }
}

class X implements Serializable {
    private double f;
    public double getF() {
        return f;
    }
    public void setF(double f) {
        this.f = f;
    }
}
