## hash table chaining

I am trying to make hash table with different functions for making the table, and each function contains options to handle collisions. I have each function working with linear and quadratic probing, does anyone know how to get it to work with chaining? In the code below I have the case using java's hash function, and case 1 and 2 within this are linear and quadratic probing. I have to add case 3 with chaining and I dont know how to do it.

Java Code:
```System.out.println("Choose the preferred hash function.\n"+
"1. Java's standard hash function\n"+
"2. First digit hash function\n"+
"3. Sum of the digits hash function");
int hashFunction = scanner.nextInt();
int[] values;
int [] keys;

switch(hashFunction)
{
case 1:// Java hash function

values = new int[lineCount];
keys = new int[lineCount];
for(int i=0;i<lineCount;i++)
{
values[i]=hash.HashValues(input);
}//for

for(int j=0;j<lineCount;j++)
{
keys[j]=hash.StandardHashkey(values[j]);
}//for

System.out.println("Which technique do you prefer to avoid collisions?\n"+
"1. Linear probing\n"+
"3. Chaining");
int tech=scanner.nextInt();
switch(tech)
{
case 1:// linear probing
for(int k = 0;k < lineCount;k++)
{
int location = keys[k];
while(table.get(location)!=null)
{
location = (location +1) % table.size();

}//while
table.put(location, values[k]);
}//for
break;
case 2:// Quadratic probing
for(int k = 0;k < lineCount;k++)
{
int location = keys[k];
while(table.get(location)!=null)
{
int ii=2;
location = (int) ((location +Math.pow((double)location+ii, 2)) % table.size());
ii++;
}//while
table.put(location, values[k]);
}//for

}//switch```