hi the problem is solved here..
you were actually reading "." after y or n, but m sure you have never terminated your input with "."
because in the line char answer=reply.findInLine(".").charAt(0);...