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