Mapa mental
Interfaces
Conteúdo do mapa
Interfaces
Can only contain Constants and Method Headers(abstract methods with no code body)
Converting between classes and interface types
- You cannot give an object a interface type value, but it can have the type of the interface.
Implementing an interface
- When a class implements an interface, it must use the implement keyword. Also it must write the code for the abstract methods the interface requires the class to have.
Polymorphism
- The term "polymorphism" comes from the Greek words for "many shapes". The same computation works for objects of many shapes, and adapts itself to the nature of the objects.
- Denotes the ability to treat objects with differences in behavior in a uniform way
- You can not cast up to the child class of a class, but you can cast down to a parent class of the class. If the parent class is "Person" and the child class is "Student", a Student object can become a Person object, but a Person object can not become a "Student" object.
Informações
- Descrição
- Mapa Mental sobre Interfaces, criado por John Hair em 03-05-2018.
- Criado por
- John Hair
- Visualizações
- 0
- Avaliação