Problem adding values stored as variables to a java list
<p>I am going to create a list that I want to add elements to.  I have obtained the elements from clients via them completing 3 dialogue boxes indicating their preferences for a new car, and now I want to add these entries to the list.</p>

<p>I have declared my instance variables and here is the constructor for my list:</p>

<pre><code> public Car(String aMaker, String aModel, int aYearBuilt);
    {
        super();
        this.maker = aMaker;
        this.model = aModel;
        this.year = aYearBuilt;
    }
</code></pre>

<p>I have successfully put the return from my first client's dialogue boxes into 3 variables, created thus:</p>

<pre><code> String inputMaker;
 String inputModel;
 int inputYear; 
</code></pre>

<p>(I remembered to use Integer.parseInt to convert the dialogue input string to an int).</p>

<p>Now I want to put the values in a list:</p>

<pre><code>List&lt;Car&gt; newCarDetails = new ArrayList&lt;Car&gt;();
</code></pre>

<p>This is where I start to go wrong:</p>

<pre><code> newCarDetails.add(new Car(inputMaker, inputModel, inputYear));
    return newCarDetails;
</code></pre>

<p>Only I have clearly underestimated the task, because it doesn't work.  I just get a hashCode back.  Any help greatly appreciated.</p>
