Distribute the possibilities and features between static initialization blocks and constructors.
You can do some experiments to check the statements.
Distribute the possibilities and features between static initialization blocks and constructors.
You can do some experiments to check the statements.
| Static initialization block | Constructor | |
|---|---|---|
| It can change values of static fields. | ||
| It's possible to call static methods inside. | ||
| It's called for each new instance. | ||
| It can change values of fields for the current instance. |
Create a free account to access the full topic