Difference between final static and static final

前端 未结 7 1931
眼角桃花
眼角桃花 2020-12-04 06:39

I found a code where it declared code like

private final static String API_RTN_SUCCESS = \"0\";
private final static String API_RTN_ERROR = \"1\";

public st         


        
7条回答
  •  死守一世寂寞
    2020-12-04 07:09

    They are the same. The order of modifiers is not significant. And note that the same rule applies in all contexts where modifiers are used in Java.

    However, most Java style guides recommend/mandate the same specific order for the modifiers. In this case, it is public static final.

提交回复
热议问题