Abbiamo un problema in caricaPartita non accetta la lettura di un arrayList
noi l'abbiamo fatto così:
public void caricaPartita()throws IOException{
try{
ObjectInputStream ois = new ObjectInputStream (new FileInputStream ("partita.dat"));
this.turno=(Integer)ois.readObject();
this.setFineGioco((Boolean)ois.readObject());
this.setGiocatori((ArrayList<Giocatore>) ois.readObject());
Banca.getInstance().setNumCase((Integer)ois.readOb ject());
Banca.getInstance().setNumAlberghi((Integer)ois.re adObject());
Banca.getInstance().setProprietaPossedute((HashSet <Proprieta>)ois.readObject());
Banca.getInstance().setInstance((Banca)ois.readObj ect());
ois.close();
}catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
e.toString();
}
}
qualcuno può aiutarci?