aspose file tools*
The moose likes Java in General and the fly likes Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Interface" Watch "Interface" New topic
Author

Interface

selvas kumars
Ranch Hand

Joined: Jan 06, 2001
Posts: 115
hai,
Can anybody explain me why interface is used in java other than solving the problem of multiple inheritance..
I am looking in terms of communication between objects.
regards,
silva.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Originally posted by selvas kumars:
Can anybody explain me why interface is used in java other than solving the problem of multiple inheritance..
I am looking in terms of communication between objects.

Pluggable architectures -- swap a class for any other class that implements the same interface. (Of course, you can work around the lack of interfaces in C++ by using multiple inheritance... )
- Peter
 
 
subject: Interface