ArrayNotFound::b : 25
When a class member is defined outside the class and if the intializer variable which is used for initializing the class member is present in more than one scope, then the class member will be initialized with the variable which belongs to the own class member scope.
I think it is bit confusing, Let me explain with the following example,
Consider the following statement,
When you look in to this, class member ‘b’ is defined outside the class and it is initialized with variable ‘a’. Here a is present in two scopes,
a. Global scope
b. Class scope
So compiler will get confuse now, and it will follow as per the standard rule.
It means it will pick up the class scope a instead of global variable a, because static variable ‘b’ belongs to the ArrayNotFound scope.