Posts by Flavio Ramos • 133 points
1 post
-
13
votes1
answer87
viewsQ: How does the compiler know the difference between the type I’m using in downcasting?
The classes Felino and Ave inherit from Criatura, the values are hypothetical only to inform the difference between specialized attributes. Criatura c1 = new Felino("Preto", true); Criatura c2 = new…