type of hashtable...
I want to create a hash table having following schema:
for a given tableSize, it creates array of Object class of length tableSize. Every Object in array is actually Vector, to implement binary tree.
here is sample code:
publicstaticclass Roomextends Object{
Vector _node =new Vector();//every room contains a vector, for binary tree implementation
public Room(){
}
publicint insert(int element){
int index=0;
//code here
return index;
}
//gets and sets here...
}
Here how i create this array:
int tableSize = 7;
Room[] hashTable=new Room[tableSize];
int nodeNumber = hashTable[integerToInsert%tableSize].insert(integerToInsert);
Problem is, the last line gives NullPointerException :(
What am I doing wrong? I feel a stupid mistake...

