这篇文章引自MIT公开课 6.005 — Software Construction on MIT OpenCourseWare, 链接为 https://ocw.mit.edu/ans7870/6/6.005/s16/getting-started/
Assertions are a great tool for keeping your code safe from bugs, but Java has them off by default.
In preferences, go to Java → Installed JREs . Click “Java SE 8”, click “Edit…”, and in the “Default VM arguments” box enter: -ea (which stands for enable assertions ).Configure your editor to use spaces instead of tabs, so your code looks the same in all editors regardless of how that editor displays tab characters.
In preferences, go to Java → Code Style → Formatter . Click the “Edit…” button next to the active profile. In the new window, change the Tab policy to “Spaces only.” Keep the Indentation size and Tab size at 4. To save your changes, enter a new “Profile name” at the top of the window and click OK.