- 博客(2)
- 资源 (7)
- 收藏
- 关注
翻译 Effective Java 3rd 条目27 消除非受检警告
当你用泛型编程时,你将会看见许多编译器警告:非受检强转警告、非受检方法调用警告、非受检参数化vararg类型警告和非受检转换警告。你多熟悉泛型一些,你将获得更少警告,但是不要期待这些新代码干净利索地编译。 许多非受检警告容易消除。例如,假设你不慎编写如下声明: Set<Lark> exaltation = new HashSet(); 编译器会轻轻地告诉你做错了什么: Vene...
2018-03-12 22:12:12 290
翻译 Effective Java 3rd 条目26 不要使用原生类型
首先,一些术语。类或者接口,它的声明有一个或者多个类型参数(type parameter),是泛型(generic)类或者接口[JLS, 8.1.2, 9.1.2]。例如,List接口有一个类型参数,E,代表它的元素类型。这个接口的完整名字是List<E>(读作“E的列表”),但是人们常常简单地叫它为List。泛型类和接口全部叫做泛型类型。 每个泛型类型定义了参数化(paramete...
2018-03-06 22:55:43 284
concurrent-patterns-best-practices-synchronization
2018-10-26
Wiley.Machine.Learning.Hands-On.for.Developers.and.Technical.Professionals
2017-04-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人