1. 4.1 enumhistorical

    1. 是什么 用来定义枚举值,是个语法糖,底层通过Enum类实现 2. 如何使用 3. 源码分析 3.1. Enum

  2. 4.2 switchhistorical

    1. 支持的功能 对byte、short、int、char、String、enum支持条件分支 2. 源码分析 2.1. int 编译之后使用idea查看class文件发现没有变化,说明int是直接比较整数值 2.2. char - 反编译之后 比较的是char的ascii码 2.3. String

  3. 4.3 transienthistorical

    序列化的时候用到。 被修饰的属性不会参与序列化,反序列化的时候值被设为初始值(null、0)

  4. 4.4 finalhistorical

    1. 用法 - 修饰类:表示该类不能被继承 - 修饰方法:表示方法不能被override(重写) - 修饰变量:表示变量只能一次赋值以后值不能被修改(常量)