Abstract Classes vs Interfaces (Java)

Rate this post



A simple example that demonstrates the use of both Abstract Classes and Interfaces. The two can be used in many different ways, either exclusively or in combination. We chose to keep them separate in order to demonstrate the main differences.

Tag: abstract class vs interface java, java, programming, abstract class, interface

Xem Thêm Bài Viết Review Khác: https://chơigame.vn/review

Nguồn: https://chơigame.vn

33 Comments

  1. Most explanations are confusing because they explain WHAT something is, but not WHEN you would use it, or what it means when you see it being used. It gives the reader more information but no way to slot and fit that information into their brain, and its left up the reader's own intelligence/experience to help connect the dots. Doesn't answer WHY I would want to use something. This video explanation does everything right.

    Reply
  2. Димитър Димитров · Edit

    Ok, but it's possible to change the abstract class to do the same as the Interface. If we change the method "paymentForWork", to be abstract and implement it in every subclass, isn't it the same? Or I'm in mistake?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *