```
public class XXX {

    @Test
    public void test() {
        B b = new B();
        b.doY();
    }
}

class A {
    public void doY() {
        XProcedure.doX(this);
    }
}

class B extends A {

    public void doY() {
        super.doY();
        XProcedure.doX(this);
    }
}

class XProcedure {

    public static void doX(A a) {
        System.out.println("AAAA!");
    }

    public static void doX(B b) {
        System.out.println("BBBB!");
    }
}

```

The output is

AAAA!
BBBB!

And I wonder why?