Karteikarten
Inheritance
Karten in diesem Stapel (19)
- 1Inheritancea class can inherit properties and behavior of another class
- 2Why inheritance?- Smaller derived class definitions
- Ease of modification of common properties
-Extensibility
-Use tried-and-tested code from a base class
- concentrate on the specialized behavior of your class
-logical structures and grouping - 3Why can a class extend multiple classes?Because a derived class may inherit different implementations for the same method signature from multiple base classes
- 4An abstract class can define only ... methods and ....abstract
constants - 5A class can inherit ... or ... classzero or one
- 6A class uses the keyword ... to inherit a classextend
- 7a class can inherit ... interfacesmultiple
- 8A class uses the keyword ... to implement an interfaceimplements
- 9Can an interface implement a class?No
- 10An interface uses the keyword ... to inherit interfacesextends
- 11Can an abstract class inherit a concrete class and vice versa?Yes
- 12Can an abstract class extend interfaces?No, it can implement interfaces
- 13Can an abstract extend another abstract class?Yes
- 14The variables of an interface are implicitly..public, final and static
- 15What should the first concrete class that is derived from a abstract class has to do ?supply the actual method implementation for all the abstract methods
- 16Is it possible to create an object of type interface ?NO
- 17what is castingcasting is the process of forcefully making a variable behave as a variable of another type
- 18the keywords this en super are implicit...object references
- 19the 'this' reference always points to an object's own reference
Informationen
- Beschreibung
- Karteikarten am Inheritance, erstellt von alim586 am 24/06/2015.
- Erstellt von
- alim586
- Aufrufe
- 16
- Tags
- Bewertung