As far as I understood the \"static initialization block\" is used to set values of static field if it cannot be done in one line.
But I do not understand why we ne
If your static variables need to be set at runtime then a static {...}
block is very helpful.
For example, if you need to set the static member to a value which is stored in a config file or database.
Also useful when you want to add values to a static Map
member as you can't add these values in the initial member declaration.