A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Beginning Java
Author
Doubt on interface instantiation in ActionListener class
satya sahu
Ranch Hand
Joined: Mar 26, 2003
Posts: 97
posted
Apr 25, 2008 11:40:00
0
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: 56175
13
I like...
posted
Apr 25, 2008 11:42:00
0
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.
[
Smart Questions
] [
JSP FAQ
] [
Books by Bear
] [
Bear's FrontMan
] [
About Bear
]
I agree. Here's the link:
http://ej-technologies/jprofiler
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Doubt on interface instantiation in ActionListener class
Similar Threads
Anonymous classes
interface question,help!
Doubt on interface instantiation in ActionListener class
anonymous inner class
can anonymous inner class implement an interface ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter