考虑到那些不起作用的简单java代码:
public class Bar extends AbstractBar{
private final Foo foo = new Foo(bar);
public Bar(){
super(foo);
}
}
Run Code Online (Sandbox Code Playgroud)
我需要在super()调用之前创建一个对象,因为我需要在母类中推送它.
我不想使用初始化块,我不想做类似的事情:
super(new Foo(bar)) 在我的构造函数..
如何在超级电话之前将数据发送到母班?