YDOOK:Dart: final 定义常量
作者:互联网
YDOOK:Dart: final 定义常量
© YDOOK Jinwei Lin, shiye.work
http://www.ydook.com
https://orcid.org/0000-0003-0558-6699
文章目录
| 关注即可看全文!随时随地阅读YDOOK海量文章!
|
|
|
|
|
|
|
|
| 关注即可看全文!随时随地阅读YDOOK海量文章!
|
|
|
|
|
|
|
|
| 关注即可看全文!随时随地阅读YDOOK海量文章!
|
|
|
|
|
|
|
|
| 关注即可看全文!随时随地阅读YDOOK海量文章!
|
|
|
|
|
|
|
|
| 关注即可看全文!随时随地阅读YDOOK海量文章!
|
|
|
|
|
|
|
|
| 关注即可看全文!随时随地阅读YDOOK海量文章!
正文:
final 定义常量的格式: final [常量名] = [具体的常量值]:
final 定义的常量不能再次被定义:
input:
main() {
final a = 123;
// a = 456; // 错误
print(a);
}
output:
123
[Done] exited with code=0 in 1.106 seconds
标签:定义,海量,随时随地,Dart,YDOOK,final,常量 来源: https://blog.csdn.net/weixin_42255190/article/details/122598388