/multipleinherit.dart Secret
Created
July 16, 2022 00:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///File ini adalah contoh dari multiple inheritance di bahasa pemrograman Dart | |
///properti geekasmedia.blogspot.com | |
//parent class | |
class Kendaraan{ | |
void cetak(){ | |
print("Kendaraan"); | |
} | |
} | |
//child class 1 | |
class Mobil extends Kendaraan{ | |
@override | |
void cetak(){ | |
print("Kendaraan"); | |
} | |
} | |
//multiple inheritance | |
class Motor extends Kendaraan implements Mobil{ | |
@override | |
void cetak(){ | |
print("Kendaraan"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment