study of java

collection study:

Using HashMap instead of HashTable because of efficiency.

Set, List, Map, ArrayList instead of Vector

Parameters of Set: All elements are unique, no repeated element;

Parameters of List: Be sorted;

Particularity of class "String" and the method "toString()"

Enforce the two methods "hashcode()" and "equals()" is very important to your own objects when you want to use HashMap to instore them.


IO study:

RandomAccessFile is out of the inheritance system of InputStream and OutputStream.



泛型

java的泛型不是协变的,数组是协变的。也就是说"List<Parent> list 不能引用List<Child>的对象" 

泛型通配符:List<?> list, <?>是所有泛型的父类,可以弥补泛型不能协变带来的不便

java的泛型类型参数只能是Object?可以是基本类型么?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值