The signature of addActionListener
method is public void addActionListener(ActionListener l)
where ActionListener
it is a functional interface (in Java programming language a functional interface it is an interface with a sole method) defining the actionPerformed
method accepting one argument of type ActionEvent
, the method signature being void actionPerformed(ActionEvent e)
.
this::increasePoints
it is method reference that should be possible to translate to...
new ActionListener() {
public void actionPerformed(ActionEvent e) {
. . .
}
}
...therefore the increasePoints
method signature must match the signature of actionPerformed
method defined by th ActionListener
interface.