Fichas
Polymorphism and Casting
Fichas del conjunto (6)
- 1PolymorphismMechanism of selecting the appropriate method for a particular object in a class hierarchy
- 2Selection of the correct method occurs:During the run of the program
- 3Dynamic bindingCompiler decides which instance method to call when the program is running
- 4Static bindingThe compiler decides which method to run at compile time.
- 5DowncastingCasting a superclass to a subclass type
- 6ClassCastExceptionThrown when there's an attempt to cast an object to a class of which it's not an instance
Información
- Descripción
- Flashcards on polymorphism and casting
- Creado por
- joannazhang13
- Visitas
- 45
- Etiquetas
- Valoración