Create scratch files

Turn show line numbers off and on

Use ⇧⌘N (macOS) / Ctrl+Alt+Shift+Insert (Windows/Linux) to create a new scratch file. If you have content selected, the new scratch file will contain that content.


Related Resources

Complete Statement
Complete Statement
Complete statement can add your semicolons, brackets and manage caret placement for you.
Create a new class
Create a new class
Create a new class and a new package.
JShell
JShell
Use JShell in IntelliJ IDEA to quickly evaluate Java expressions.