title: Calling a constructor in another constructor (and getting the modified variables from cons.1)
body: <p>I searched the web but did not find my answers. Here is my question.
  The goal here is to use my verifications (if codeForme&lt;0 || codeforme>9)... etc only in my first constructor, because my two other constructors are calling the first one.</p>
  
  <p>But, when i enter for example codeforme = 20 in my second constructor, it is not modified as it should be after running the first constructor. I know the problem is probably from the this.codeForme = forme because it takes my parameter's forme instead of the codeForme from the first. 
  There should be an easy way, thanks!</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>public class carteMere {
  
      // variable(s) de classe s'il y a lieu
      private static int identifiant = 0;
      // variable(s) d'instance s'il y a lieu
      private String marque;
      private int codeForme = 0;
      private int capaciteMaxMemoire = 8;
      private int memoireInstalle = 0;
      private int codeCarte;
      // constructeur(s) s'il y a lieu
      public carteMere( String marque,
                        int codeForme,
                        int capaciteMaxMemoire,
                        int memoireInstalle) {
          this.marque = marque;
          this.identifiant = identifiant+1;
          this.codeCarte=this.identifiant;
          if(codeForme &lt; 0 || codeForme &gt; 9){
              codeForme = 0;
          }
          if(capaciteMaxMemoire&lt;=0){
              capaciteMaxMemoire = 8;
          }
          if(memoireInstalle &lt; 0){
              memoireInstalle = 0;
          }else if (memoireInstalle&gt; capaciteMaxMemoire){
              memoireInstalle = capaciteMaxMemoire;
          }
          codeForme = codeForme;
          capaciteMaxMemoire = capaciteMaxMemoire;
          memoireInstalle = memoireInstalle;
      }
      public carteMere(int forme, int capaciteMax, int memoireInstalle){
          this("ASUS", forme, capaciteMax, memoireInstalle);
          this.codeForme = forme;
          this.capaciteMaxMemoire = capaciteMax;
          this.memoireInstalle = memoireInstalle;
          this.codeCarte=this.identifiant;
      }
      public carteMere(int codeForme, int memoireInstalle){
          this(codeForme, 8, memoireInstalle);
          this.codeForme=codeForme;
          this.memoireInstalle=memoireInstalle;
          this.identifiant = identifiant;
          this.codeCarte=this.identifiant;
      }
  </code></pre>
  
  <p>Edit:</p>
  
  <p>If I do:
  carte1 = new carteMere(10, 8);</p>
  
  <p>Then I inspect carte1, the codeForme is 10, and it should be 0 because it should have been modifed in the 1st constructor.</p>