How to mark logical sections of code in Java comments?

前端 未结 11 2181
温柔的废话
温柔的废话 2021-01-29 19:42

Java classes are generally divided into logical \"blocks\". Is there a convention to mark these sections? Ideally, it would be supported by the major IDEs.

I personally

11条回答
  •  粉色の甜心
    2021-01-29 20:35

    A modern IDE allows you to view your code in many different ways, and even reorganize it. Eclipse even allows you to view the definition of the code you have the cursor on in another panel.

    Any automatic reorganizing of your code, will cause such markup to break down.

    If you want grouping then consider putting things belonging together in the same class, and things not belonging together in different classes.

提交回复
热议问题