IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

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/help/img/idea/2021.1/ac_extract_constant.png
Gif