Polymorphism and Casting

Descripción

Flashcards on polymorphism and casting
joannazhang13
Fichas por joannazhang13, actualizado hace más de 1 año
joannazhang13
Creado por joannazhang13 hace más de 9 años
13
0

Resumen del Recurso

Pregunta Respuesta
Polymorphism Mechanism of selecting the appropriate method for a particular object in a class hierarchy
Selection of the correct method occurs: During the run of the program
Dynamic binding Compiler decides which instance method to call when the program is running
Static binding The compiler decides which method to run at compile time.
Downcasting Casting a superclass to a subclass type
ClassCastException Thrown when there's an attempt to cast an object to a class of which it's not an instance
Mostrar resumen completo Ocultar resumen completo

Similar

Missed Questions on Inheritance/Polymorphism Test
Nik Nguyen
Classes and Objects Quiz
joannazhang13
What is an interface?
joannazhang13
Manufacturing Technology I
Marissa Gotsell
Abstract Class Quiz
joannazhang13
Acting
casey soles
Tester Example
joannazhang13
Abstract Classes & Interfaces & Polymorphism
Nik Nguyen
Subclass Example
joannazhang13
Polymorphism
Nik Nguyen
Concept Flashcards
Nik Nguyen