|
|
Initialization of class variables | Constructors are deserved for initialization of instance variables.
Class variable should be initialized before initialization of any instance variable.
|
It is too late - and not natural - to initialize class variables in ordinary constructors |
| In most cases, we rely on initializers for initialization of class variables. In some rare situations we need the power of static constructors. An example is shown below. |
Read more about initialization of class variables in the text book version of this material. |