When use Interface and Abstract class? Example.

An abstract class allows you to create functionality that subclasses can implement or override. 


An interface only allows you to define functionality, not implement it. And whereas a class can extend only one abstract class, it can take advantage of multiple interfaces.










Share:

No comments:

Post a Comment

Tuesday, 2 July 2019

When use Interface and Abstract class? Example.

An abstract class allows you to create functionality that subclasses can implement or override. 


An interface only allows you to define functionality, not implement it. And whereas a class can extend only one abstract class, it can take advantage of multiple interfaces.










No comments:

Post a Comment

Popular

Total Pageviews

Archive