l'array l'ho messo in maniera corretta.adesso mi da i seguenti errori perchè ho modificato quello che ti avevo inviato poco fa e penso che i miei errori consistano nel fatto ke non so usare i blocchi catch e try
codice:
stampa()
            
   public static void stampa()
  { 
   
    try
    {
      FileWriter fileout =new FileWriter ("elenco.txt");
      PrintWriter out=new PrintWriter (fileout); 
    
        
    
        for(int i=0; i<array.length;i++)
      {
    out.print(array[i].getNome()+"" + array[i].getCognome() +""+ array[i].getTelefono+ "\n");
          out.println();}
      
    
    out close();
        }catch(IOException e) 
    {
      System.out.println("Errore IOException nel metodo stampa " );
    }
    
   
  
    }     
  }
gli errori invece sono :[/CODE]
RubricaTestc.java:137: ';' expected
out close();
^
RubricaTestc.java:138: 'catch' without 'try'
catch(IOException e)
^
RubricaTestc.java:124: 'try' without 'catch' or 'finally'
try
^
RubricaTestc.java:138: ')' expected
catch(IOException e)
^
RubricaTestc.java:138: not a statement
catch(IOException e)
^
RubricaTestc.java:138: ';' expected
catch(IOException e)
^
RubricaTestc.java:146: class, interface, or enum expected
}
^
7 errors
>Exit code: 1[/CODE]