Java中Interface和@interface的区别

interface:声明一个java的接口

@interface:是用来修饰Annotation的,表示实现了java.lang.annotation.Annotation接口

在我们创建一个自定义Annotation(注解)的时候会使用:

public @interface MyAnnotation {

}

原文地址:https://www.cnblogs.com/asaltydog/p/13272350.html