Lets say I have a object foo from class Foo. Lets say class Foo has a lot of fields that characterize its offsprings.
When having so many fields, is it preferred to initialize them all via the constructor of Foo eg.
Foo foo = new Foo(0, 12, 123, 2, 2, (and so on...));
or initialize them in the constructor or method from the class one will be using foo eg.
Foo foo = new Foo();
public void initFoo() {
foo.setX(1);
foo.setY(3);
foo.setH(3);
(and so on...)
}