1. 进入Eclipse,选择Window -> Preference;
  2. 选择Java -> Code Style -> Formatter,点击Active profile中的Edit…;
    Eclipse 更改代码格式
  3. 进入到如下窗口后,进行你想要的修改。修改完后点击Apply;Eclipse 更改代码格式
  4. 回到之前的窗口,点击Apply和Apply and Close;
  5. 选择Source -> Format,然后你的代码就自动更改为你想要的格式了。

相关文章:

  • 2021-03-27
  • 2022-02-08
  • 2021-10-04
  • 2021-07-22
猜你喜欢
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案