aspose file tools*
The moose likes Beginning Java and the fly likes Doubt on interface instantiation in ActionListener class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Doubt on interface instantiation in ActionListener class

satya sahu
Ranch Hand

Joined: Mar 26, 2003
Posts: 97
jButton2.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){

}
});
ActionListener is an interface. Interfaces can't be instantiated. Then how in the above anonymous implementation new of the interface is done?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please read this for more information.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt on interface instantiation in ActionListener class
 
Similar Threads
Anonymous classes
interface question,help!
can anonymous inner class implement an interface ?
Doubt on interface instantiation in ActionListener class
anonymous inner class