Frage im Vorstellungsgespräch bei Aurionpro Solutions

difference between interface and abstract class

Antwort im Vorstellungsgespräch

Anonym

11. Okt. 2017

1. A class can implement any number of interfaces but a subclass can at most use only one abstract class. 2. An abstract class can have non-abstract Methods(concrete methods) while in case of Interface all the methods has to be abstract. 3. An abstract class can declare or use any variables while an interface is not allowed to do so.