Explicit casting from super-class to sub-class
By using a cast you’re essentially telling the compiler “trust me. I’m a professional, I know what I’m doing and I know that although you can’t guarantee it, I’m telling you that this animal variable is definitely going to be a dog.” Since the animal isn’t actually a dog (it’s an animal, you could do … Read more