Interface declaration
This is discussed in Objective 1.1 - Interface declaration.
Do not forget, what is in the Objective 1.1 written about interface declarations.
Extend an interface
-
an interface can extend one or more other interfaces
-
an interface cannot extend anything but another interface
Abstract class declaration
abstract class <ClassName> {
//...
}
You can read more about abstract classes in Objective 1.1 - Non-access modifier: abstract.
Extend an abstract class
- a class can extend only one class (no multiple inheritance)
- abstract class can extend concrete and abstract classes
Example for interface declaration, interface implementation, abstract class declaration, abstract class extension:
You can download source code here.
No comments:
Post a Comment