Re: understand the concept of interfaces
- From: Aki Laukkanen <aki.laukkanen@xxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 11:21:58 +0200
Prejith wrote:
if interface is just emply methods then what is
the point of having those empty method names under one tag..
Because an interface is kind of like a contract about the contents of the implementing classes. That is, the classes implementing a particular interface can be relied on to have at least the methods defined in the interface. For example, all ActionListeners have the ActionPerformed(ActionEvent e) method, which makes it possible to handle them all in the same way by invoking the said method. What the ActionListener is supposed to actually do when the method is invoked is left for the programmer to decide.
--
-Aki Laukkanen
.
- References:
- understand the concept of interfaces
- From: Prejith
- understand the concept of interfaces
- Prev by Date: Re: NEED YOUR HELP
- Next by Date: Re: NEED YOUR HELP
- Previous by thread: Re: understand the concept of interfaces
- Next by thread: Re: understand the concept of interfaces
- Index(es):
Relevant Pages
|
|