posted 22 years ago
if an anonymous class is declared using the name of an interface as follows:
new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
...
}
}
it is said to be implementing that interface(ActionListener here)
if an anonymous class is declared using the name of a class as follows:
new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
...
}
}
it is said to be extending that class(WindowAdapter here)
the "clause" extends or implements is NEVER used.