I created my HashTable just like that as told in the video. My code is saved at https://ide.codingblocks.com/s/398219
When i compile it using:
javac HashTable.java -Xlint:unchecked
It gives the warning:
HashTable.java:25: warning: [unchecked] unchecked cast
HTPair op=(HTPair)other;
^
required: HashTable<K,V>.HTPair
found: Object
where K,V are type-variables:
K extends Object declared in class HashTable
V extends Object declared in class HashTable
HashTable.java:37: warning: [unchecked] unchecked cast
this.bucketArray=(LinkedList[])new LinkedList[cap];
^
required: LinkedList<HashTable<K,V>.HTPair>[]
found: LinkedList[]
where K,V are type-variables:
K extends Object declared in class HashTable
V extends Object declared in class HashTable
2 warnings