Polymorphism and Casting

Descrição

Flashcards on polymorphism and casting
joannazhang13
FlashCards por joannazhang13, atualizado more than 1 year ago
joannazhang13
Criado por joannazhang13 aproximadamente 10 anos atrás
16
0
1 2 3 4 5 (0)

Resumo de Recurso

Questão Responda
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

0 comentários

There are no comments, be the first and leave one below:

Semelhante

Missed Questions on Inheritance/Polymorphism Test
Nik Nguyen
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
What does inheritance do?
joannazhang13
Inheritance
joannazhang13