You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

staticinit.java 295B

12345678910111213141516171819
  1. import org.aspectj.lang.annotation.After;
  2. import org.aspectj.lang.annotation.Aspect;
  3. @Aspect
  4. class staticinit {
  5. @After("staticinitialization(MyType)")
  6. public void print(){
  7. System.out.println("INITIALIZED");
  8. }
  9. }
  10. //public
  11. class MyType {
  12. public static void main(){
  13. new MyType();
  14. }
  15. }