title: variable is still null after I assign a value to it JAVA
body: <pre><code>public void crearCliente() {
  
      int i, k, j, l;
      registro r = new registro();
      k = lr.getSize();
  
      for (i = 0; i &lt; k; i++) {
          r = lr.get(i);
          l = r.getSize();
  
          String contenido[] = new String[8];
          for (j = 0; j &lt; l; j++) {
              contenido[j] = r.getCampoR(j);
              //System.out.println(contenido[j]);
          }
          c1 = new Cliente(contenido[0], contenido[1], contenido[2], contenido[3], contenido[4], contenido[5], contenido[6], contenido[7]);
          c1.verCliente();}
  </code></pre>
  
  <p>In this code, at the end,I assign a value to c1, but when I print it i get null in all the c1 fields. I write my code down for the class Cliente.
  I want to print all the values i gave to c1 but i do not know why it print null in all the fields. I follow the code using the debugger and everything is right until the sentences which assign all the values to the new variable.</p>
  
  <pre><code>public class Cliente {
  
  private String Id_cliente;
  private String Cod_postal;
  private String Numero;
  private String Calle;
  private String Provincia;
  private String Poblacion;
  private String Telefono;
  private String Apellidos;
  
  public Cliente(String idc, String cp, String num, String cal, String prov, String pob, String tlf, String aps){
  
      idc = Id_cliente;
      cp = Cod_postal;
      num = Numero;
      cal = Calle;
      prov = Provincia;
      pob = Poblacion;
      tlf = Telefono;
      aps = Apellidos;
  
  }
  
  public void verCliente(){
  
     System.out.println("Id_cliente: "+ Id_cliente);
     System.out.println("Codigo postal: "+ Cod_postal);
     System.out.println("Numero: "+ Numero);
     System.out.println("Calle: "+ Calle);
     System.out.println("Provincia: "+ Provincia);
     System.out.println("Poblacion: "+ Poblacion);
     System.out.println("Telefono: "+ Telefono);
     System.out.println("Apellidos: "+ Apellidos);
  
  }
  
  }
  </code></pre>