Question: what is the difference between static block and instance block?
Answer: static blocks executes before instance blocks in java. instance blocks executes after static blocks in java. Static and non-static variables (instance variables) can be accessed inside instance block. ... instance block executes only when instance of class is created, not called when class is loaded in java.