title: Adding objects to a list - error in code
body: <p>I have to write a program as homework, and I got stuck with a problem, for which I can't encounter the solution. Maybe you guys can help me. 
  I have on class:</p>
  
  <pre><code>public class Listas {
      //atributos
      private Medico[] medicos;
      private Enfermera[] enfermeras;
  
      //Constructor
      public Listas(){
          medicos = new Medico[5];
          enfermeras = new Enfermera[5];
      }
  
      //Sets y gets
      //Medicos
      public void setMedicos(Medico[] medicos){
          this.medicos = medicos;
      }
      public Medico[] getMedicos(){
          return medicos;
      }
      //Enfermeras
      public void setEnfermeras(Enfermera[] enfermeras){
          this.enfermeras = enfermeras;
      }
      public Enfermera[] getEnfermeras(){
          return enfermeras;
      }
  
      Medico med1 = new Medico(1, "Juan" , "Pérez", "6799652-3", "1234567870101", 89098, 15000, true);
      Medico med2 = new Medico(2, "Luis", "Gutiérrez", "8964547-3", "9876543260101", 98554, 12000, false);
      Medico med3 = new Medico(3, "Eduardo", "González", "8786456-6", "5642871750101", 5653, 17000, true);
      Medico med4 = new Medico(4, "Guadalupe", "Torres", "5684873-1", "4562973920101", 10098, 17000, true);
      Medico med5 = new Medico(5, "María", "Castillo", "8765485-7", "569395290101", 67965, 13000, false);
  
      medicos[1] = med1;
      medicos[2] = med2;
      medicos[3] = med3;
      medicos[4] = med4;
      medicos[5] = med5;  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>The program tells me that there is something wrong at the end of the line where I trie to define the variable med5. 
  All I want to do is to add med1 to 5 to the array medicos[]. The constructor of med1 - 5 are in another class, called Medico.</p>
  
  <p>Any suggestions of what I'm doing wrong?</p>