Hashing with quadratic probing
-
The following Java class implements hashing with open addressing,using quadratic probing to resolve collisions.When I try to compile it (using microsoft's visual java),it gives me this error:Undefined name 'OpenAddressException' at line32.Could someone please tell me what is wrong with it? [jkouris@hotmail.com] --------------------------------------------------------------------------------------------------- public class OpenAddress { private int[] Element; private int TableSize; private int EmptyCell; OpenAddress(int tablesize) { int index; TableSize=tablesize; EmptyCell=0; Element=new int[tablesize]; for(index=0;index
-
The following Java class implements hashing with open addressing,using quadratic probing to resolve collisions.When I try to compile it (using microsoft's visual java),it gives me this error:Undefined name 'OpenAddressException' at line32.Could someone please tell me what is wrong with it? [jkouris@hotmail.com] --------------------------------------------------------------------------------------------------- public class OpenAddress { private int[] Element; private int TableSize; private int EmptyCell; OpenAddress(int tablesize) { int index; TableSize=tablesize; EmptyCell=0; Element=new int[tablesize]; for(index=0;index
-
change throw new OpenAddressException("Element not found in table."); to throw new Exception("Element not found in table.");
thnx a lot