Static Block, Instance Block and Constructor: Order of Execution
Overview In Java, we have static block, instance block and constructor which gets executed when we create an instance. All of these blocks can be used to write some initialization logic. Have you ever wondered in what sequence these blocks get executed? First Java looks for the existence of “static blocks”. A static keyword is … Read more