Keyboard shortcuts#

These are the most important keyboard shortcuts - the ones you should memorize (for the Linux/Windows version; on Mac the ctrl is usually replaced by Cmd):

  • alt + enter - context menu, depending on where the cursor is: solve problems & errors, create tests, create variables etc.

  • psvm + Tab - create main()

  • sout + Tab - create print statement

  • soutv + Tab - create print statement with variable

  • fori + Tab - create for loop`

  • ^ + shift + R - run main()

  • shift + F6 - rename variable, method or class

  • ctrl + B - go to source

  • ctrl + N - generate code (getters and setters, constructors etc.)

  • ctrl + O - override methods

  • ctrl + Q or F1 - show Javadoc of selected method

  • ctrl + R - repeat last run