Passing arguments with a method in it. Java
<p>Could you please explain what this approach of passing such an argument to the <code>addActionListener</code> method is? I understand that button variable of a <code>JButton</code> type is created and event listener is defined. It's not really clear for me the <code>addActionListener</code> argument, namely <code>actionPerformed</code> method definition in it. Where can I ready about such an approach? Thanks.</p>

<pre><code>JButton button = new JButton("New button");
button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent arg0) {
        System.out.println("Hello");
    }
});
</code></pre>
