Preferable way to initialize object
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3918578/should-i-initialize-variable-within-constructor-or-outside-constructor">Should I initialize variable within constructor or outside constructor</a>  </p>
</blockquote>



<p>For example I have a field <code>int x</code>. 
Does Java prefer the field to be initialized when it's declared</p>

<pre><code>int x = 0;
</code></pre>

<p>or rather in the constructor?</p>

<pre><code>public foo() {
x = 0;
}
</code></pre>

<p>Which is more preferred from a designing perspective?</p>
