Empty new line at the end of the Java source files

前端 未结 9 706
春和景丽
春和景丽 2021-02-01 00:44

In my current project, we always insert an empty new line at the end of the Java source files. We also enforce this with CheckStyle (with error level).

I was searching fo

9条回答
  •  野的像风
    2021-02-01 01:26

    I have never heard of such a requirement.

    In fact, I just confirmed that a Java program will run without any compiler/runtime errors or warnings when there isn't a blank line at the end of the file.

    This, as some commenters have said, must be a coding style issue. Unfortunately, I can't suggest why it may be important for there to be a blank line at the end of a file in Java. In fact, it seems entirely pointless to me

提交回复
热议问题