![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
By implementing an interface, you are forming a 'contract' between the class programmer and the user of that class that states "this class is guaranteed to provide the minimum functionality dictated by this defined interface." A very simple example is a FileLoader interface that defines a loadFile() method signature. Say you want to write two classes, MacintoshFileLoader and PCFileLoader. By having these classes implement the FileLoader interface, anyone using the two classes would be sure that an implementation of the loadFile() method would be provided. Hope this helps. Regards, Jody
Replies: |
Sponsored Links
|