+ 1

Difference between interface and abstract class

31st May 2019, 3:32 AM
$@G@®️
$@G@®️ - avatar
3 ответов
+ 1
In addition to above difference there many difference between interface Vs abstract class 1. Abstract class contains static members where as interface doesn't contains static members. 2. Performance of abstract class is faster where as interface performance is slower because it requires time to search actual method in the corresponding class. 3. Abstract class is used to implement the core identity of class where as interface is used to implement peripheral identities of class. 4. A class can use only one abstract class where as class can use multiple interface 5. An abstract class can be fully/partially implemented or not implemented where as interface should be implemented fully. 6.An abstract can have abstract methods and non-abstract methods where as an interface has only abstract methods. 7.We can declare constructor in abstract class where as in interface we cannot declare constructor.
31st May 2019, 4:50 AM
$@G@®️
$@G@®️ - avatar