IntelliJ IDEA
 
Get IntelliJ IDEA

Generate code

Last modified: 20 December 2024

IntelliJ IDEA provides multiple ways to generate common code constructs and recurring elements, which helps you increase productivity. These can be either file templates used when creating a new file, custom or predefined live templates that are applied differently based on the context, various wrappers, or automatic pairing of characters.

Additionally, IntelliJ IDEA provides code completion and Emmet support.

This topic describes ways to generate standard code constructs specific to Java: constructors, method overrides and implementations, getters and setters, and so on. Go to Code | Generate AltInsert to open the popup menu with available constructs that you can generate.

Here is a video that demonstrates how to generate various code constructs in IntelliJ IDEA: