Created
January 29, 2024 02:47
-
-
Save doyle-flutter/00a9f12f2a3c7de0639a387a03d9118d to your computer and use it in GitHub Desktop.
class01 implements
This file contains 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(){ | |
Templete t_obj = Obj(); | |
t_obj.a; | |
t_obj.func(); | |
// t_obj.b; // err -> only Obj | |
} | |
class Templete{ | |
int a = 0; | |
void func(){} | |
} | |
class Obj implements Templete{ | |
@override | |
int a = 10; | |
int b = 20; | |
@override | |
void func() { | |
print("obj"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment