java - Constructor this() unnecessary? -


there class u1 extending class u. class u empty...

in constructor of u1 there first line, calling constructor of superclass...

public u1(plate plate, int order) {    super(plate, order); ...  } 

now want delete class u1 , in class u whatever done in u1 far... so, not need call constructor of superclass since class u not gonna have superclass...

is this(plate, order) unnecessary , can omit it?

this how constructor of u gonna like:

public u(plate plate, int order)     {        this(plate, order);     ...      } 

it unnecessary , expect results in stack overflow, because call constructor within constructor.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -