Just curious but why do you have

int sum = 0;


in your boolean method? It doesn't seem like you do anything with it. I'm not sure what your specific error is but I'm pretty sure that it might...