![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javase
yin_Pisces
这个作者很懒,什么都没留下…
展开
-
枚举与常量类的区别
常量和枚举之间对比,有对比才有差距!原创 2016-07-27 23:18:57 · 18374 阅读 · 3 评论 -
枚举的示例
枚举类package com.yisces.y_enum;import java.util.EnumMap;import java.util.EnumSet;/** * 定义枚举 * @author yisces * */public enum EnumConstant { //此时每一个枚举就想当与一个类,他们拥有共同的父类,因此要实现父类的getValue方法 ME(原创 2016-07-28 00:40:08 · 457 阅读 · 1 评论 -
用普通类模拟枚举--枚举的原理
package com.yisces.y_enum;/** * 用普通类模拟枚举--枚举的原理 * @author yisces * */public class EnumPrinciple { /** * 构造方法 使当前类不能在被别人继承 */ private EnumPrinciple(){}; private EnumPrinciple(i原创 2016-07-28 00:55:20 · 367 阅读 · 0 评论 -
枚举的总结和常用方法
枚举定义:enum是计算机编程语言中的一种数据类型。枚举类型:在实际问题中,有些变量的取值被限定在一个有限的范围内。例如,一个星期内只有七天,一年只有十二个月,一个班每周有六门课程等等。如果把这些量说明为整型, 字符型或其它类型显然是不妥当的。为此,C语言提供了一种称为“枚举”的类型。在“枚举”类型的定义中列举出所有可能的取值,被说明为该“枚举”类型的变 量取值不能超过定义的范围。应该原创 2016-07-28 01:03:06 · 1969 阅读 · 0 评论 -
Java源码学习--ArrayList源码解析
ArrayList类中全局变量的意义/** * The array buffer into which the elements of the ArrayList are stored. * The capacity of the ArrayList is the length of this array buffer. */ private transient原创 2016-08-01 02:23:17 · 555 阅读 · 0 评论