I was studying in a book and here is the example:
public class SimpleGeometricObject {
private String color = "white";
...
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?
Thanks