package com.company;
import java.lang.annotation.Inherited;
@Inherited
@interface css extends Data {
String a();
String b();
String cd=null;
}
package com.company;
public @interface Data {
byte testparameter = 0;
}
我这样接口继承怎么报错呢?
注解不是接口,
@interface
不是interface
, 不能用类继承的方式使用。可以类似如下的方式实现:
参考:https://stackoverflow.com/que...
BTW:
接口实现用动词
implements
而不是extends