What is difference between abstract and interface?
Abstract | Interfaces |
---|---|
Abstract classes cannot be implemented. | The Interfaces needs to be implemented. |
They are models which can have some methods to be used by all the inherited children. | It is a contract, where the receiver is asking a specific type of input and sender agrees to send it that way. |
Abstract classes can have private methods. | Interfaces can not have private methods. All the plans are public. |
BY Best Interview Question ON 26 Nov 2020