posted 13 years ago
Hi Ponnusamy,
Actually if we want the subclasses should follow some standards, we can go for interface / abstract.
But in the subclasses, we need to give our own implementation to the interface method. Instead of doing this, we can declare a local method in the class itself.
Here what is the real use of interface.
But in abstract, we can give some default behaviour. But in interface we cant give the default behaviour too.
Please explain the interface concept. How it helps in loose coupling.
Thanks.