import java.io.*; public class DeserializeDemo { public static void main(String [] args) { Employee e, e1; try { FileInputStream fileIn = new FileInputStream("employees.ser"); ObjectInputStream in = new ObjectInputStream(fileIn); e = (Employee) in.readObject(); e1 = (Employee) in.readObject(); in.close(); fileIn.close(); }catch(IOException i) { i.printStackTrace(); return; }catch(ClassNotFoundException ex) { System.out.println("Employee class not found"); ex.printStackTrace(); return; } System.out.println(e); System.out.println(e1); } }