Any thoughts about the differences between interface and abstract class? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Any thoughts about the differences between interface and abstract class?

I just wonder the main difference between both and i still couldnt figure it out by myself

5th May 2019, 11:10 AM
REXH
REXH - avatar
2 Answers
+ 5
Another difference which is not mentioned in the article is that: Abstract class can be extended, which means it can have child class but it's necessary that child class must have a definition of abstract method present in the parent class. While on the other hand, interfaces cannot be extended which means that they don't have child classes. Interfaces are implemented by some classes.
5th May 2019, 6:49 PM
blACk sh4d0w
blACk sh4d0w - avatar