When do you use interfaces and abstract classes? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

When do you use interfaces and abstract classes?

when?

17th Mar 2018, 8:20 PM
X x
X x - avatar
2 Answers
+ 5
If you are designing large functional units, use an abstract class. If you want to provide common, implemented functionality among all implementations of your component, use an abstract class. Abstract classes allow you to partially implement your class, whereas interfaces contain no implementation for any members.
17th Mar 2018, 8:21 PM
Scooby
Scooby - avatar
+ 2
that was faster than i thought it would be
17th Mar 2018, 8:22 PM
X x
X x - avatar