摘要:
一.内部类 1.内部类的分类:共四种 i.成员内部类 ii.静态内部类 iii.局部内部类 iv.匿名内部类 2.内部类的使用及注意事项 1.成员内部类:与外部类的实例成员差不多,也是需要通过外部类的实例进行调用的,但唯一不一样的就是它是一个类,一般来说这种类多用来增强外部类的封装性,因为这种内部类 阅读全文
posted @ 2020-08-01 22:40
Lzzycola
阅读(107)
评论(0)
推荐(0)
摘要:
一.接口的使用 1.关键字 interface implements interface TestInterface{ } class TestClass implements TestInterface{ } interface为接口的声明关键字,而implements则为类实现接口的关键字 2. 阅读全文
posted @ 2020-08-01 14:25
Lzzycola
阅读(100)
评论(0)
推荐(0)
摘要:
一.static 1.static能修饰的范围及语法: class TestStatic{ static { } static class ClassStatic{ } static String a; public static void staticFuntion() { } } i.静态构造块 阅读全文
posted @ 2020-08-01 13:56
Lzzycola
阅读(125)
评论(0)
推荐(0)

浙公网安备 33010602011771号