The JetBrains Guide is shutting down on March 30, 2026. more...

Extract Parameter

Extract code to a parameter in Kotlin.

Highlight the code you want to extract to a field and press ⌥⌘P (macOS) / Ctrl+Alt+P (Windows/Linux), to extract it.

Extracting parameters can be useful in improving the readability of your code.

Related Resources

Convert to Expression Body
Convert to Expression Body
Use quick intentions to convert to use expression body syntax.
Convert Concatenation To Template
Convert Concatenation To Template
Use quick intentions to convert to a template string.
Your First AI Agent in Kotlin
Your First AI Agent in Kotlin
Get started with Koog today!