ObjectInputStream in = new ObjectInputStream(new FilInputStream("coins.dat")); Coin c = (Coin)in.readObject();