Ciao a tutti!
Ho un problema con un metodo di una classe "ClienteSocieta"....il compilatore mi segnala questi due errori:
salvaCliente(ClienteSocieta) in ClienteSocieta cannot be applied to (java.lang.Object)
salvaListaClienti(ListNode) in ClienteSocieta cannot be applied to (List)
Qualcuno sa dirmi il perchè?
GRAZIE!
Codice:
codice:private void salvaCliente(ClienteSocieta c) { FileOutputStream f = null; try { f = new FileOutputStream("Clienti.dat", true); } catch (IOException e) { System.out.println("Errore 1"); e.printStackTrace(); System.exit(1); } ObjectOutputStream os = null; try { os = new ObjectOutputStream(f); os.writeObject(c); os.flush(); os.close(); } catch (IOException e) { System.out.println("Errore 2"); e.printStackTrace(); System.exit(2); } } public ListNode salvaListaClienti(ListNode l) { while(l.length()!=0) { this.salvaCliente(l.head()); //RIGA DOVE MI SEGNALA ERRORE return salvaListaClienti(l.tail()); //RIGA DOVE MI SEGNALA ERRORE } }

Rispondi quotando
