Thread: Anonymous Code
View Single Post
Old 01-14-2013, 11:39 AM   PM User | #1
Zaid
New Coder

 
Join Date: Sep 2012
Location: Mumbai
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Zaid is an unknown quantity at this point
Question Anonymous Code

I recently encountered a code in my java program that is as follows..
Code:
button.addActionListener(new ActionListener() {
   public void actionPerformed(ActionEvent e)
   {
      //Some action here
   }
});
I don't know what is after new ActionListener() but it seems a method of ActionListener is overridden and in some block....huh

Last edited by Zaid; 01-14-2013 at 11:41 AM..
Zaid is offline   Reply With Quote