java - Instance variable in derived class has the same name with private instance variable of superclass? -



java - Instance variable in derived class has the same name with private instance variable of superclass? -

is possible have instance variable in derived class has same name private instance variable in superclass? in other words, can override private instance variable or private method?

yes possible declare such variable, because variable in super class private cannot seen in kid class , there no conflict.

but note not same 'overriding', externally visible fellow member hidden 1 same name in kid class.

java inheritance instance-variables

Comments

Popular posts from this blog

php - How to pass multiple values from url -

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

database - php search bar when I press submit with nothing in the search bar it shows all the data -