Instance Control Flow

Instance Control Flow

In this tutorial, we are going to discuss instance control flow in Java. Instance Control Flow decides the sequence of activities that will be executed when we run a java class containing instance variables, methods, and blocks.

Instance Control Flow
Process of instance control flow

Instance control flow will execute at the time of object creation. The following is the sequence of statements that will execute at the time of object creation.

1. Identification of Instance members

(1-8) Steps.

2. Execution of Instance variable assignments and Instance block from top to bottom.

(9-14) Steps.

3. Execution of Main Method.

(15) Steps.

Note

Static control flow is only one-time activity, and that will execute at the time of class loading. But instance control flow is not a one-time activity. And it will execute for every object creation separately.

That’s all about Instance Control Flow in Java. If you have any queries or feedback, please write us email at contact@waytoeasylearn.com. Enjoy learning, Enjoy Java.!

Instance Control Flow
Scroll to top