Is there any relation between the class that implements interface and that interface?

后端 未结 8 831
有刺的猬
有刺的猬 2020-12-19 16:56

Consider this class hierarchy:

  • Book extends Goods
  • Book implements Taxable

As we know, there is a relationship

8条回答
  •  感动是毒
    2020-12-19 17:11

    Book implements Taxable
    

    Here also the relationship between Book and Taxable is

    Book 'is a' Taxable

    Refer this. You can see it says

    When we talk about inheritance the most commonly used keyword would be extends and implements. These words would determine whether one object IS-A type of another.

提交回复
热议问题