In my previous polymorphism tutorials I discussed the principle of polymorphic method invocation. At runtime, the JVM determines which method to invoke based on the type of the object, not the type of the reference variable. Since polymorphism applies to instance methods, does polymorphism apply to instance variables? The answer is no, polymorphism does not apply to instance variables.
Can we override an instance variable just like we can override an instance method? Technically NO, but there is more to it. While it is true that subclasses inherit members of a superclass – and that includes accessible instance variables – simply declaring an instance variable in the subclass with the same type and name merely 'hides' the inherited superclass instance variable.
En esta página del sitio puede ver el video en línea Learn Java Programming - Polymorphism and Instance Variables Tutorial de Duración hora minuto segunda en buena calidad , que subió el usuario Daniel Ross 06 septiembre 2015, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 929 veces y le gustó 13 a los espectadores. Disfruta viendo!