Java中的泛型、枚举和注解
摘要:
1.泛型: 一、为什么要有泛型(Generic)?1.解决元素存储的安全性问题任何类型都可以添加到集合中:类型不安全2.解决获取数据元素时,需要类型强转的问题读取出来的对象需要强转:繁琐可能有ClassCastException 1.泛型的声明 interface List<T> 和 class T 阅读全文
posted @ 2018-03-27 17:19 pjlhf 阅读(229) 评论(0) 推荐(0)
posted @ 2018-03-27 17:19 pjlhf 阅读(229) 评论(0) 推荐(0)
posted @ 2018-03-27 17:18 pjlhf 阅读(122) 评论(0) 推荐(0)
posted @ 2018-03-27 17:17 pjlhf 阅读(182) 评论(0) 推荐(0)
posted @ 2018-03-27 17:16 pjlhf 阅读(197) 评论(0) 推荐(0)
posted @ 2018-03-27 11:03 pjlhf 阅读(1068) 评论(0) 推荐(0)
posted @ 2018-03-27 10:57 pjlhf 阅读(379) 评论(0) 推荐(0)
posted @ 2018-03-27 09:30 pjlhf 阅读(20540) 评论(0) 推荐(0)