【java】序列化对象失败如何解决
本帖最后由 redHmian 于 2022-6-21 21:35 编辑public void writeToFile(File f) throws IOException {
ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(f));
Circle circle = this;
os.writeObject(circle);
System.out.println("序列化成功");
os.close();
}
{:10_278:}{:10_319:} {:5_102:} {:7_146:}
页:
[1]