我如何才能访问类中的main
真假?
我应该在主课上写什么? check
Sample
package annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface annotation {
public String name() default "Jimmy";
public boolean check() default false;
}
package annotation;
@annotation(name = "Jack", check = false)
public class Sample {
public String str = "Hi";
public void printHi(String str) {
System.out.println(str);
}
}
package annotation;
public class Main {
public static void main(String[] args) {
}
}