我想保存在文本文件中而不覆盖当前数据。我的意思是,每当我保存时,将要保存的下一个数据将转到新行/下一行,这是我的问题,我不知道该怎么做。
有人可以帮我解决这个问题吗?
这是 save() 方法中的代码:
public void save(String filename) throws IOException
{
FileOutputStream fOut = new FileOutputStream(filename);
ObjectOutputStream outSt = new ObjectOutputStream(fOut);
outSt.writeObject(this);
}