当前位置:网站首页>事实最终变量与最终变量
事实最终变量与最终变量
2022-04-23 05:42:00 【hanyc..】
事实最终变量是指一旦被赋值以后就不会被改变的量,不意味着必须被final修饰才行。
比如在某个方法中有int a = 23; 而这个变量a在这被初始化赋值后,它的值再也没有被改变过(虽然它本身可以被改变),那么这个a就可以称为事实最终变量。
最终变量:使用关键字final声明变量称为最终变量。最终变量只能进行一次赋值(也就是说一旦初始化之后就不能再改变变量的值了)
版权声明
本文为[hanyc..]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_42732184/article/details/123598744
边栏推荐
猜你喜欢

Pilotage growth · ingenuity empowerment -- yonmaster developer training and pilotage plan is fully launched

Flutter nouvelle génération de rendu graphique Impeller

MySQL lock mechanism

Use of qwbengneview and qwebchannel.

多线程与高并发(3)——synchronized原理

Cross platform packaging of QT packaging program

Sea Level Anomaly 和 Sea Surface Height Anomaly 的区别

软件架构设计——软件架构风格

Generation of straightening body in 3D slicer

JVM系列(4)——内存溢出(OOM)
随机推荐
Deep learning object detection
Golang implements Ping connectivity detection case through exec module
Total score of [Huawei machine test] (how to deal with the wrong answer? Go back once to represent one wrong answer)
多线程与高并发(3)——synchronized原理
OSI层常用协议
MySQL realizes master-slave replication / master-slave synchronization
mysql-触发器、存储过程、存储函数
JVM系列(4)——内存溢出(OOM)
Object to map
【华为机试】考试得分总数(如何处理答错的情况?回溯一次,代表答错一题)
Hongji cyclone RPA provides technical support for Guojin securities and realizes process automation in more than 200 business scenarios
合约锁仓漏洞
2-軟件設計原則
No.1.#_ 6 Navicat shortcuts
Character recognition easyocr
Error 2003 (HY000) when Windows connects MySQL: can't connect to MySQL server on 'localhost' (10061)
Linear sieve method (prime sieve)
poi生成excel,插入图片
Sword finger offer II 022 The entry node of the link in the linked list
多线程与高并发(2)——synchronized用法详解