Importance of static block in java - Java @ Desk

Sunday, May 19, 2013

Importance of static block in java

1) Static block is the one which gets executed when the class is loaded by JVM.
2) It executeds even before the main block gets executed.
3) Static block executes only once.






1 comment:

  1. Static block in java

    Thanks for sharing this post, really this post is very simple and easy.

    ReplyDelete