What is the advantage of using Interfaces in
Java?
I know people will say it adds a layer to the system that hiues the functionality
of Class1 from Class2, but I mean pratically, from a developers point of view what's the advantage?
Because looking at the sample below, you have to call the class (CLass1) to create a new instance via
the Interface anyway.
What advantage does using the Interface give you?
Also when is/isn't a good time to use interfaces? Is there a sort of rule to it? I mean is it worth using an interface
for a Bean that just has a number of get/set methods (user details say) in it?
[EJFH: Fixed
thread title]
[ November 28, 2007: Message edited by: Ernest Friedman-Hill ]
[ November 28, 2007: Message edited by: Keith Seller ]