SIB,IIB and Examples on SIB and IIB
- 20th Jan 2015
- 7
- 31829
- SIB and IIB with examples Sognificance of IIB Sognificance of SIB What is the advantage of SIB over IIB in java
SIB – Static Initialization Block SIB executes when the class gets loaded and executes only once in entire execution IIB – Instance Initialization Block IIB executes when the constructor is called but before the execution of constructor. So it executes as many times as constructor gets executed. Let’s see the example package com.kb.instanceblock; public […]