Jump to content

Abstract type: Difference between revisions

No edit summary
Line 413:
class Foo {
// abstract methods can have an implementation for
// use in super calls.
abstract void foo() {
writeln("Test");
Line 420:
 
interface Bar {
// interface methods are implicitly abstract and cannot
// provide default implementations
void bar();
 
// Final interface methods are implicitly abstract and cannotallowed.
final int spam() { return 1; }
}
 
class Baz : Foo, Bar { // superSuper class must come first.
override void foo() {
writefln("Meep");
Cookies help us deliver our services. By using our services, you agree to our use of cookies.