Hola:
En el trozo de código al final que pone
File fichero;
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(fichero));
estás declarando una variable fichero nueva y la estás usando sin haberle dado ningún valor. Eso es la protesta de "variable fichero might not have been initialized". Deberías inicializarla con algo como esto
File fichero = new File ("c:\unPath\unFichero");
File está en java.io
Se bueno. |