Flashcards
Polymorphism
Flashcards do conjunto (9)
- 1Polymorphism enables you to program in the _____, rather than in the _____general, specific
- 2What are the 2 types of polymorphism?- Compile Time
- Run Time - 3What is compile time polymorphism?Method Overloading
- 4What is Runtime polymorphism?uses inheritance and interfaces
- 5Runtime Polymorphism enables programs to process objects that share the same _____ as though they are all objects of that superclasssuperclass
- 6Create a dog object that is the subclass of animal :Animal animal1 = new Dog();
- 7What is virtual method invocation?Java calls the appropriate method for the object that is referred to in each variable
- 8Create a polymorphic array of animals :String[] animals = {"Dog", "Cat", "Mouse"};
- 9Cycle through that array :for (Animal a : animals){
a.makeANoise();
}
Informações
- Descrição
- Masters Programming I FlashCards sobre Polymorphism, criado por nhunsdale02 em 06-06-2014.
- Criado por
- nhunsdale02 · jun 2014
- Atualizado
- 6 abr 2018
- Visualizações
- 14
- Avaliação