Annotation access modifier - public vs abstract

前端 未结 5 657
夕颜
夕颜 2021-01-23 13:08

What is the difference between public and abstract modifier for an elements of annotation in Java.

For example we coul

5条回答
  •  旧时难觅i
    2021-01-23 13:35

    An annotation type is a special kind of interface. In an interface, all methods are implicitly both public and abstract, but is allowed to explicitly state that a method is public and/or abstract. Declaring an interface method as public or abstract has no effect, however.

提交回复
热议问题