由於 Java 方法策略的限制,對 this() 或 super() 的初始呼叫會顯示為建構子呼叫的同層呼叫,而非子項呼叫。請參閱下列範例:
class A { public A() { this(0); } public A(int i) { } } and: class B { public static void test() { new A(); } } The call tree will look like this: B.test() -A.<init>(int) -A.<init>() Rather than this: B.test() -A.<init>() -A.<init>(int) |