Interface does not have constructor, then how can it be inherited?

前端 未结 5 654
情话喂你
情话喂你 2021-01-24 19:43

As I know the subclass constructor calls the super class constructor by using super();. But since interface doesn\'t have any constructor, how can inheritance take

5条回答
  •  盖世英雄少女心
    2021-01-24 20:23

    Interface doesn't contain constructor because of the following reasons:

    • The data member of the interface are already initialized .
    • Constructors of the special defined methods which are not permitted to defined and moreover interface data member are static.

提交回复
热议问题