I'm writing a hash table code. Taking mode according to table size.I want to start with table -1 and null.I understand that it is empty. Java hash table ready.So I do not find many examples.
My fill_in method is not running.
class Node{
int index;
int number;
Node next;
public Node(int index,int number,Node next){
this.index=index;
this.next=next;
this.number=number;
}
}
class Table{
int max_row;
public Table(int size){
this.max_row=size;
}
Node rows[]= new Node[max_row];
public void fill_in(){
for(int i=0; i<max_row;i++)
rows[i]=new Node(-1,-1,null);
}