Originally posted by Abdulla Mamuwala:
Hi
An interface is [b]100% abstract class. We know that an abstract class cannot be instantiated, therefore the same applies to an interface.[/B] An interface is not the same as an abstract class - they are quite different.
However, it is correct that you can not instantiate an interface.
If you look at some mock exam questions, though, you might be lead to believe that you can have instances of interfaces. Check out this example:
ActionListener is an interface and it appears that we're instantiating it.
However, it's important to realize that we're not actually making a new instance of an interface, we're creating an anonymous object that
implements ActionListener and that's certainly legal.
I hope that helps. If you have some specific examples that you're still confused about, post them here and I'll try to help.
Corey