I saw all the past Questions in StackOverflow, I don't find an appropriate answer of my Question. I want to create a Array of List of class Association, but after execution, I have an Exception like that in the line :
private static final int SIZE=99999;
private List<Association <K,V>> [] hashtab;
hashtab = (List<Association <K,V>>[]) new Object [SIZE];
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.util.List; at com.code.classes.TableHachage.(TableHachage.java:20) at com.test.TestHash.main(TestHash.java:11)
How can I fix that?
NB: It's a academic problem, so we can't use directly HashTable, we have to use Collision resolution by chaining, and use LinkedList for that