Java declaring private member variables : <p>I was studying in a book and here is the example:</p>

<pre><code>public class SimpleGeometricObject {
private String color = "white";
...
</code></pre>

<p>I've always been taught that we can't give a value to a member variable if its not in a constructor or in a setter. This example from the book, is it a good example? Can we do that? Is that a style problem?</p>

<p>Thanks</p>
