jjzjj

InnerAnnotation

全部标签

java - 是否可以为另一种注释类型的注释字段指定默认值?

public@interfaceInnerAnnotation{Stringvalue()default"hello";}public@interfaceOuterAnnotation{InnerAnnotationvalue()default???}还有一个案例:public@interfaceAnotherOuterAnnotation{InnerAnnotation[]value()default???UPD:{}} 最佳答案 是的,有可能:public@interfaceInnerAnnotation{Stringvalue