Oracle interview question

Write a object onto file using serailization, Had to write the code.

Interview Answer

Anonymous

16 Dec 2013

File f= new File("file name"); Objectouputstream oos= new ObjectOutpuStream(new FileOutPutstream(f)); oos.writeObject(objectName); ---- write the Entity class which implements Serializable and has Default constructor.