-
reassigned local variables and reassigned parameters are underlined.
-
When reading a very long method code, if the parameter is not underlined, you know for sure that its value is not reassigned anywhere in this method and it contains exactly the same value that was passed to this method at any point.
-
many developers prefer to avoid mutable state, and reassign variables only in rare cases when it is really necessary.
-
use final to mark non-mutable variables
java intelliJ 变量下出现下划线
最新推荐文章于 2024-05-13 21:03:48 发布