NetBeansはこのエロアを示しています
I / Oプロセスのエラーjava.io.WriteAbortedException:書き込みが中止されました。java.io.NotSerializableException:katanemimena1.Account at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)at katanemimena1.ATM.actionPerformed(ATM.java: 208)
なぜこれがコードなのかわかりません
ObjectInputStream in =null;
Account acc =null;
try{
in =new ObjectInputStream(new FileInputStream( "Accounts.txt"));
while
( (acc = (Account) in.readObject()) !=null){
System.out.println(acc);
}
}
catch(EOFException ex) {
System.out.println("End of file reached.");
}
catch(ClassNotFoundException ex) {
System.out.println("Error casting") ;
ex.printStackTrace();
}
catch(FileNotFoundException ex) {
System.out.println("Error specified file does not exist") ;
ex.printStackTrace();
}
catch(IOException ex) {
System.out.println("Error with I/O processes") ;
ex.printStackTrace();
}finally{
try{
in.close();
}
catch(IOException ex){
System.out.println("Another IOException during the closing");
ex.printStackTrace();
}
}