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
版权声明:本文为DecafTea原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。