The shortcut key of Eclipse is Ctrl+Shift+F. In Eclipse, the shortcut key can automatically format the source code in java, and adjust the indentation, spaces and line breaks of the code according to the code style rules built in Eclipse to make it look cleaner.
IntelliJDEA: shortcut key: CTRL+ALT+L. intelli jdea is a popular JavaIDE developed by JetBrains. This shortcut will automatically format the entire file or the selected code snippet according to the code style rules set by the project.