In the output, you observe that the count is 3 for all the three objects. This is because the static variable objectCount is shared among all instances of the class.
When an object is created, the constructor increments the value of the shared count. Since, obj1, obj2, and obj3 are created successively, thereby each time incrementing the value of the shared count. Consequently, the getObjectCount() function retrieves the current count, which reflects the cumulative number of objects created throughout the program's execution.