Java Static Initializer Block

  • [deleted]
    + 3 comments

    Static block is used to run code when a class is intialized or you can say before static void main function is called the static block will be run. so any calculations needed before the main funcation can be done in there. Hope this helps