Your has
function should probably look like this:
if (c[val]!=null && word.length()>1) {
return c[val].has(word.substring(1)); //<-- Change is on this line
} else if (c[val].flag==true && word.length()==1) {
...etc
You perform the recursive call, but you really need to let that value propagate back out to the original caller.
Anon.
2010-02-08 23:03:01