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 -

php - Laravel not returning controller -

c# - Confused on how to specify a Platform and Version while using ChromeOptions for RemoteWebDriver with Selenium donNet since recent updates -