Hello friends , I am back here with some questions on interview which i have with me and i would like the clarification for the same.Please would u lemme know that wats the exact diffrence between an abstract class and an interface ??
Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Another key difference is how they are used. If you have an abstract class the assumption is that one or more concrete classes will extend it and supply any missing functionality. If you have an interface the assumption is that there will be one or more classes that will implement it. However these new classes can extend only one parent class, but can implement multiple interfaces. Often the best design choice is to create an interface and a class (possibly abstract) that provides a default implementation of that interface. Then other designers have the choice of either using the interface or the class, whichever is most appropriate for their needs. A good example of this is with how the AWT event listeners were implemented. For nearly every java.awt.event.XXXListener (interface) there is a corresponding java.awt.event.XXXAdapter (abstract class). It's a powerful design pattern. [ November 17, 2003: Message edited by: Wayne L Johnson ]
subject: Difference between Abstract class and Interface