1. @ Test 只能用于方法

2. 方法必须为  public 修饰,无返回值,无参数。

3.

4. 

 测试类的名称不能Test  :

问题: Error:(16, 6) java: 不兼容的类型: com.gyf.test.Test无法转换为java.lang.annotation.Annotation

 

更多推荐