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.

QualifiedSuperClassConstructorInvocations_PR401.java 595B

123456789101112131415161718192021222324252627
  1. public class QualifiedSuperClassConstructorInvocations_PR401 {
  2. public static void main(String[] args) {
  3. ChildOfInner coi = new ChildOfInner();
  4. org.aspectj.testing.Tester.checkEqual(S.s, "Outer:Inner:ChildOfInner");
  5. }
  6. }
  7. class S {
  8. static String s = "";
  9. }
  10. class Outer {
  11. public Outer() {
  12. S.s += "Outer";
  13. }
  14. class Inner{
  15. public Inner() {
  16. S.s += ":Inner";
  17. }
  18. }
  19. }
  20. class ChildOfInner extends Outer.Inner {
  21. ChildOfInner() {
  22. (new Outer()).super();
  23. S.s += ":ChildOfInner";
  24. }
  25. }