While I think precisely speaking, all classes fields, regardless of their access modifier, will all be "inherited" (notice the quotation here) by the subclass. For private fields of superclass, subclass does "own" them but they cannot access them directly unless providing getter and setter methods. It is important to realize that having no access to a private member of superclass doesn't mean it's not there in the subclass.
why are you teaching all these before introducing the concepts of class, objects, method, constructors, and functions? while you're mentioning all these terms
You forgot to tell the no access modifier concept clearly. In case of no access modifier given for the methods or variables then those are known to be public in the same package but they cannot be accessed by the classes of different packages.
Check out our trending course on Java Essential Training - bitly.ws/LGbp
Use coupon “TH-cam 12” to get “FLAT 12%” OFF at checkout.
While I think precisely speaking, all classes fields, regardless of their access modifier, will all be "inherited" (notice the quotation here) by the subclass. For private fields of superclass, subclass does "own" them but they cannot access them directly unless providing getter and setter methods. It is important to realize that having no access to a private member of superclass doesn't mean it's not there in the subclass.
Thank you madam 🙏💐
explain good
why are you teaching all these before introducing the concepts of class, objects, method, constructors, and functions? while you're mentioning all these terms
Facing same problem bro...
You forgot to tell the no access modifier concept clearly. In case of no access modifier given for the methods or variables then those are known to be public in the same package but they cannot be accessed by the classes of different packages.
I want to marry you
Pleaaase! leave her to me and I will pay u a trillion dollars.