This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
What do you mean by "not working"? What happens when you press the memory button? Does your app throw an exception? Does the "memory" contain the wrong value? Or does something else happen that is unexpected? Please give us more details about what happens and we can help you out.
With that said, you should add some System.out.println() calls (or find some other way) to display the values of the variables involved. This will often help you see what is happening in your code.