快捷键快速生成 try-catch 块

在 IntelliJ IDEA 中,可以使用快捷键快速生成 try-catch 块。以下是在 Windows 和 macOS 上的默认快捷键:

  • Windows:在被检查的代码行上,按下 Ctrl+Alt+T,然后选择 Surround With -> Try/Catch.
  • macOS:在被检查的代码行上,按下 Command+Option+T,然后选择 Surround With -> Try/Catch.

这是一个快捷键。 

你可能感兴趣的:(后端,后端)