I want to write an Integer Object to the disk and then read it back. I can't figure out the command for reading it back. I know it needs to be cast as appropriate wrapper class. Someone please help. Thanks File fd = new File("d:\\Number.dat"); try { ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fd)); out.writeObject(new Integer(17)); out.close(); ObjectInputStream in = new ObjectInputStream(new FileInputStream(fd)); System.out.println( (in.readObject).intValue() ); } catch (Exception e) {} } }