Where do you keep Constants used throughout your application?

前端 未结 5 1152
小蘑菇
小蘑菇 2021-02-05 03:59

Is interface an acceptable place to store my

public static final Foo bar

Do you extrapolate them to be read from outside of the program? Do you

5条回答
  •  误落风尘
    2021-02-05 04:12

    I would use an abstract final class since it would be a more explicit declaration of the modifiers as opposed to using an interface. But, like Michael said, they should be logically grouped and be part of an existing class or interface if they semantically belong there.

提交回复
热议问题