Ok, I'm not sure when this specific thing would be important, but I have an example that is sort of like it (which is far more important and realistic than what you have above), but is the same concept.
Lets say we have an array that contains a mixture of A, B, and C objects. We obviously need to determine the identifier of the array. We don't want to use Object since it is too vague, but if we use A, each element can be either A Objects, B Objects, or C Objects, since B and C inherit from A. So, observe the code below:
A[] arr = new A[]{new A(),new B(),new C(),new B(),new C(),new A()};
Now, lets say we want to go through the array and call the callme() method on each object. When we pull the each item out of the array, we have to pull them as A Objects, since that is what the array is identified to. But, some of them are not A Objects, and they know they are not A Objects. So, when we run the code below:
A[] arr = new A[]{new A(),new B(),new C(),new B(),new C(),new A()};
for(int i=0;i<arr.length;i++)
{
A item = arr[i];
item.callme();
}
It outputs:
Inside A's callme method
Inside B's callme method
Inside C's callme method
Inside B's callme method
Inside C's callme method
Inside A's callme method
Even though we don't necessarily know what the Object we are pulling out (A,B, or C), the object knows what it is, so we can assign a temporary A object to each value in the array, but still have it operate like the object that it is.
NOTE: There are a few little tid-bits about this, such as even though an object is a B or a C object, by setting it to an A object, we are restricting those B and C objects to only have access to the methods and variables in the A class. But that is kind of confusing to visualize.