Created
April 11, 2022 14:47
-
-
Save bigbany/c1297450dd30dc0e393863f82941dcfb to your computer and use it in GitHub Desktop.
interface_abstract
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
void main(){ | |
BoyGroup bts = BoyGroup('BTS'); | |
print(bts is IdolInterface); | |
} | |
abstract class IdolInterface{ | |
String name; | |
IdolInterface(this.name); | |
void sayName(); | |
} | |
class BoyGroup implements IdolInterface{ | |
String name; | |
BoyGroup(this.name); | |
void sayName(){} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment