title: Store an array in HashMap
body: <p>i'm new to Java. How can i store an array of integers values in a HashMap, after that i write this HashMap in a txt file  but this isn't important at the moment. I can store single fields but not an array. Any ideas ? </p>
  
  <pre><code>public void salveazaObiectulCreat(String caleSpreFisier) {
  
      HashMap map = new HashMap();
  
      map.put ("Autorul",numelePrenumeleAutorului);
      map.put ("Denumirea cartii",denumireaCartii);
      map.put ("Culoarea cartii",culoareaCartii);
      map.put ("Genul cartii",gen);
      map.put ("Limba",limba);
      map.put ("Numarul de copii",numarulDeCopii);
      map.put ("Numarul de pagini",numarulDePagini);
      map.put ("Pretul cartii",pretulCartii);
  
    try  {
  
        File file = new File(caleSpreFisier);  
  
        FileOutputStream f = new FileOutputStream(file);  
  
        ObjectOutputStream s = new ObjectOutputStream(f);          
  
        s.writeObject(map);
  
        s.close();
  
         } catch(Exception e){
  
             System.out.println("An exception has occured");     
      }   
  }
  </code></pre>