摘要:        
三十、用enum代替int常量: 枚举类型是指由一组固定的常量组成合法值的类型,该特征是在Java 1.5 中开始被支持的,之前的Java代码都是通过“公有静态常量域字段”的方法来简单模拟枚举的,如: public static final int APPLE_FUJI = 0; public static final int APPLE_PIPPIN = 1; public static final int APPLE_GRANNY_SMITH = 2; ... ... public static final int ORANGE_NAVEL = 0; public s...    阅读全文
posted @ 2012-01-23 00:01
OrangeAdmin
阅读(5004)
评论(6)
推荐(4)
        
                    
                
浙公网安备 33010602011771号