How to call superconstructor in a neat way
- by sandis
So here is my code:
public MyClass (int y) {
super(y,x,x);
//some code
}
My problem is that in this case i want to generate a 'x' and sent to the super constructor. However the call to the superconstructor must be the first line in this constructor. Of course I could do something like this:
int x;
{
x = generateX();
}
But this…