[Solved] What class does this variable belong to?


Yes, it will. Although it is going through an upcast, you will find that for the upcasted (Mammal) instance, the following condition still holds:

(myMammal is Horse) == true

But actually doing this is an anti-pattern. Go for an architecture using interfaces instead.

solved What class does this variable belong to?