Pregunta | Respuesta |
Inheritance | a class can inherit properties and behavior of another class |
Why 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 |
Why can a class extend multiple classes? | Because a derived class may inherit different implementations for the same method signature from multiple base classes |
An abstract class can define only ... methods and .... | abstract constants |
A class can inherit ... or ... class | zero or one |
A class uses the keyword ... to inherit a class | extend |
a class can inherit ... interfaces | multiple |
A class uses the keyword ... to implement an interface | implements |
Can an interface implement a class? | No |
An interface uses the keyword ... to inherit interfaces | extends |
Can an abstract class inherit a concrete class and vice versa? | Yes |
Can an abstract class extend interfaces? | No, it can implement interfaces |
Can an abstract extend another abstract class? | Yes |
The variables of an interface are implicitly.. | public, final and static |
What 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 |
Is it possible to create an object of type interface ? | NO |
what is casting | casting is the process of forcefully making a variable behave as a variable of another type |
the keywords this en super are implicit... | object references |
the 'this' reference always points to an object's own reference |
¿Quieres crear tus propias Fichas gratiscon GoConqr? Más información.