Extract constant

Last modified: 21 June 2021

The Extract Constant refactoring makes your source code easier to read and maintain. It also helps you avoid using hardcoded constants without any explanations about their values or purpose.

The Extract Constant refactoring helps you avoid using hardcoded constants without any explanations about their values or purpose.

https://resources.jetbrains.com.cn/help/img/idea/2021.1/ac_extract_constant.png
Gif