I\'m working through a book, and the following code throws a NPE at runtime when the JButton is clicked, at the line button.actionPerformed. I\'ve done my best to be sure m
This create the variable, but the scope of this new variable is inside the method. You've already declared button in your class though. It should just be: