工作中常用的静态常量定义方式与通过枚举让一些判断条件写的"优雅一点点"
使用 interface嵌套interface的 方式,能够层级更为清楚的使用一些静态常量
Eclipse快捷键:
Ctrl+Shift +X 变大写
Ctrl+Shift +Y 变小写
package constants;
public interface Constants {
/**
* 月份
*/
public interface Month{
public s...
原创
2020-04-16 22:33:03 ·
248 阅读 ·
0 评论