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.

PackagePublic.java 422B

1234567891011121314151617181920212223
  1. interface PackagePublic {
  2. //empty interface
  3. }
  4. //aspectj introduce a method to this interface
  5. privileged aspect aspectWorld {
  6. public abstract void PackagePublic.world();
  7. }
  8. //class test implements hello interface, and
  9. //method world
  10. class test implements PackagePublic{
  11. public void world() {
  12. System.out.println("hello");
  13. }
  14. public static void main(String[] args) {
  15. test t = new test();
  16. t.world();
  17. }
  18. }