简介:
- An inner class can be defined inside a class, inside a method, and even as part of an expression
- There are four types of inner classes:
static inner classes (nested class) 静态内部类(嵌套类)
|
member inner classes 成员内部类
|
local inner classes 局部内部类 定义在方法中,作用域很小。 |
anonymous inner classes 匿名内部类 没有类名。但隐式的继承了一个父类或实现了一个接口 class$1.class,因为没有名字 |