A recursive solution:
public class Element{
/* ... */
public void addTail(Element e){
if (next == null)
next = e; //we are at the end, add it
else
next.addTail(e);//let the next node take responsibility
}
}
public void add(String s){
int index = hash(s) % data.length;
System.out.println("Adding at index: " + index);
Element e = this.data[index];
e.addTail(new Element(s));
}