ObjectOutputStream problem?
I wish to put an ArrayList Object into a File
Can any one tell me what's problem of following code?
public void writeLFile(ArrayList l,File lfFile)
try
{
ObjectOutputStream leafOut=new
ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(lfFile)));
leafOut.writeObject(l);
leafOut.close();
}
catch (Exception ex){
ex.printStackTrace();
}
}
error is:
java.io.NotSerializableException: floatkd.kddata
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:417)
at floatkd.Dfkdtree.writeLFile(Dfkdtree.java:56)
......

