Tuesday, November 29, 2011

Core Java Interview Questions :What is difference between an Abstract class and Interface?

1.Interfaces provide a form of multiple inheritance. A class can extend only one other class.:An Interface has only Abstract methods and final static variable, where as an Abstract class have both instances methods as well as abstract methods.:Abstract are the classes in which both abstract methods and concrete methods(the methods which have implementation) can be written whereas in interface only abstract methods which dont have implementation are there.Other difference is an abstract class can extend only one class but an interface can implement many classes which supports multiple inheritance.:Interfaces provide a common method&

No comments:

Post a Comment