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.
2) It executeds even before the main block gets executed.
3) Static block executes only once.
Static block in java
ReplyDeleteThanks for sharing this post, really this post is very simple and easy.