你用fulsh()写进文件了吗?或者是最后close()掉?

解决方案 »

  1.   

    源程序是这样得:
     
          o=new ObjectOutputStream (new FileOutputStream (io));
          i=new ObjectInputStream (new FileInputStream (io));
          word =new LinkWord ();
          o.writeObject (word);
          o.close();
          i.readObject(word);
          最后在关闭事件中我也关闭了流o和i
    此程序没有语法错误,io是一个已经初始化好得文件,名字为:save.dat,直接读倒是没有问题,但是重新启动程序,就读不出来了