How to mark logical sections of code in Java comments?

前端 未结 11 2097
温柔的废话
温柔的废话 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:11

    As far as I know there is no such thing as a supported specification for grouping class members together. You can use what-ever comment convention you like, but chances are it will not be supported by any tool.

    It is better to group related members into separate class via inheritance or aggregation. This is considered a good OOP style

提交回复
热议问题