Java parameter passing question
<p>I have kind of a general java question I'm looking for an answer to.  Lets say I have an object with a property height and I have a method that uses height to make some calculation.  Is it better to pass the property height to the method or is it any different to pass the full object and use a getter to retrieve the value of height.  I hope this makes sense.</p>

<p>e.g.</p>

<pre><code>public getHeightInMeters(Object object) {
    return object.getHeight()*x;
}
</code></pre>

<p>is the same, worse, better than?</p>

<pre><code>public getHeightInMeters(Height height) {
    return height*x;
}
</code></pre>
