Java coding convention about static method

前端 未结 7 632
情深已故
情深已故 2021-02-05 16:24

It is a very simple question, but I think it is a little bit controversial.

When I code Java classes I use the following order.

class Foo {

    // stati         


        
7条回答
  •  囚心锁ツ
    2021-02-05 17:12

    Just for the record, this is from the GWT article you linked:

    We acknowledge that plenty of great approaches exist out there. We're simply trying to pick one that is at least somewhat consistent with Sun's Java coding conventions...

    So the style they use

    1. is proposed for GWT not for general usage
    2. deviates somewhat from the standard conventions
    3. is acknowledged to be one of many good standards

    So I'd say, if there's no reason not to stick with your current conventions, why change them?

提交回复
热议问题