我想做以下事情:
public class Sub extends Super {
public Sub(Super underlying) {
if (underlying == null) {
underlying = super; // this line is illegal
}
this.underlying = underlying;
}
@Override
public void method() {
underlying.method();
}
}
这样的事情怎么能做到?