title: Read method return values from constructor without parameters
body: <p>This is my superclass Masina that contains a constructor without parameters, one with parameters and a copy constructor</p>
  
  <pre><code>package proiect;
  import java.util.Scanner;
  
  public class Masina {
      int NrDeLocuri,Putere;
      float Pret;
      String Culoare;
      String Producator;
  
  public Masina(){
              this.Producator = "Default";
              this.Pret = 0;
              this.Culoare = "Default";
              this.Putere = 0;
              this.NrDeLocuri = 0;
              }
  public Masina(String prod,int pr,String cu,int pu,int nrl)
          {
              Producator=prod;
              Pret=pr;
              Culoare=cu;
              Putere=pu;
              NrDeLocuri=nrl;
              }
  public Masina(Masina other)
          {
              this.Producator=other.Producator;
              this.Pret=other.Pret;
              this.Culoare=other.Culoare;
              this.Putere=other.Putere;
              this.NrDeLocuri=other.NrDeLocuri;
              }
  
  public Masina citireDate()
  {
      Masina m=new Masina();
      Scanner sc1 = new Scanner(System.in);
      System.out.println("Introduceti Producatorul : ");
      m.Producator = sc1.next();
      System.out.println("Introduceti Pretul: ");
      m.Pret = sc1.nextFloat();
      System.out.println("Introduceti Culoarea: ");
      m.Culoare = sc1.next();
      System.out.println("Introduceti Puterea : ");
      m.Putere = sc1.nextInt();
      System.out.println("Introduceti Numarul de Locuri : ");
      m.NrDeLocuri = sc1.nextInt();
      return m;
  
  }
  
  
  
  
  public String toString()
          {
              return "Producator: "+Producator+"\nPret: "+Pret+"\nCuloare: "+
                      Culoare+"\nPutere: "+Putere+"\nNumaraDeLocuri: "+NrDeLocuri;
              }
  }
  </code></pre>
  
  <p>This is the test class where I create an object a of Masina's type, the data must be read with the reading method declared in Masina class named citireDate.</p>
  
  <pre><code>package proiect;
  import java.util.Scanner;
  import java.util.ArrayList;
  
  
  public class TestMasina {
  
      public static void main(String args[]){
  
          Masina a = new Masina();
  
          a.citireDate();
          System.out.println(a.toString());
      }
  
  }
  </code></pre>
  
  <p>next are the results after running the program</p>
  
  <pre><code>Introduceti Producatorul : 
  BMW
  Introduceti Pretul: 
  500
  Introduceti Culoarea: 
  Alba
  Introduceti Puterea : 
  200
  Introduceti Numarul de Locuri : 
  5
  Producator: Default
  Pret: 0.0
  Culoare: Default
  Putere: 0
  NumaraDeLocuri: 0
  </code></pre>
  
  <p>My reading method does not return the values that I gave to object's parameters like "Culoare" "Putere" etc. Return give's the default values. </p>