0 votes
in JAVA by

Why are static blocks used?

1 Answer

0 votes
by

Why are static blocks used?

They serve the primary function of initializing the static variables. If multiple static blocks are there they are executed in the sequence in which they are written in a top-down manner.

...