java - Super constructor call -


in java, if class extends super class , default first line of constructor super(), fields of super class initialized, or constructor run?

also, if constructor in superclass calls method happens in both classes, run super class or sub class version?

in java, if class extends super class , default first line of constructor super(), fields of super class initialised? or constructor run?

the fields of superclass initialized prior superclass constructor body running.

see section 15.9.4 , section 12.5 of jls details.

also, if constructor in superclass calls method happens in both classes, run super class or sub class version?

assuming subclass method overrides superclass one, subclass implementation called. seen bad thing, means method can't rely on initialized subclass constructor.


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -