Yes, because you never set any values for a and b in your objects, you just set local values in the accept method.
And you are not going to learn Java by posting questions here for every basic mistake you make. I suggest you go to
The Java™ Tutorials[
^] and learn it in a properly structured way.