.
. , , , , . , , :
class Foo
{
private static final Foo FOO_BAR = new Foo("bar");
private static final Foo FOO_BAZ = new Foo("baz");
private final String name;
public Foo(String n)
{
name = n;
}
[...]
}
Here, the name in the first instance is initialized to "bar" before initializing FOO_BAZ.
source
share