最新文章列表

Item 25: Prefer lists to arrays

1.  Arrays are covariant which means simply that if Sub is a subtype of Super, then the array type Sub[] is a subtype of Super[]. Generics, by contrast, are invariant: for any two distinct types Type1 ...
leonzhx 评论(0) 有857人浏览 2014-03-24 21:39

关于java泛型的小测试(wildcard,erasure,covariant,raw type)

java的泛型机制让人头大,很难搞,我也生晚,见识也浅,权且抛砖引玉,望各位看官多多指点! 从测试中暂时得到的几个小结论: 原生类型与<?>并不相同,从测试中的warning可以看到这一点;           其一,原生类型会擦除其所有实例成员的泛型参数;           其二,<?>代表我要使用泛型,而不是原生类型;           其三,<Object ...
InvocationHandler 评论(0) 有2570人浏览 2012-07-14 20:40

最近博客热门TAG

Java(141741) C(73643) C++(68602) SQL(64557) C#(59604) XML(59131) HTML(59042) JavaScript(54916) .net(54782) Web(54511) 工作(54116) Linux(50906) Oracle(49861) 应用服务器(43285) Spring(40811) 编程(39452) Windows(39380) JSP(37540) MySQL(37266) 数据结构(36420)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics