Several shortcuts most commonly used in Eclipse

1. Batch modification

ALT+SHIFT+R

2. Enter the main method quickly

  1. Type main
  2. alt+/

3. Quickly enter System.out.println

  1. Type syso
  2. alt+/

4. Enter for quickly

  1. Type for
  2. alt+/

5. View java source code

Method 1.
Move to the top of the code and hold down the Ctrl key with the mouse. Method 2. First select the method you want to view, and then press F3

6. Code formatting

ctrl+shift+f

7. Quick assistant

ctrl+shift+o
import class
can be used to remove unused classes, etc.

8.Quick notes

Method 1. Select one or more lines of code ctrl+shift+c
Method 2. Select one or more lines of code ctrl+shift+ /

9. Quickly add comments (@author)

alt+shift+J

10. Quick solution tips

In the wrong line, use ctrl+1. For example, if you forget to import the class, you can use this to solve it

11. Delete the current line

ctrl+d

12. Find and replace

ctrl+f

13. Case conversion

ctrl+shift+x The selected ones are converted to upper case
ctrl+shift+y The selected ones are converted to lower case

14. Quick generation of toString getter setter construction method

Method 1. Through the menu -> Source, you can see the options for quick generation

Method 2. Use the shortcut key shift+alt+s to pop up this option
Insert picture description here


Continuously updating...

Article reference learning address: http://how2j.cn?p=109053

Guess you like

Origin blog.csdn.net/weixin_44325444/article/details/101002688