1
Reply

When to use Abstract class & Interface In a project.Where we use encapsulation in a project

rajani 0

rajani 0

12y
2.6k
0
Reply

    If you have logic that will be the same for all the derived classes, it is best to go for a abstract class instead of an interface. You can implement multiple interfaces but only inherit from one class. Encapsulation hides the internal state and behavior of an object