Java - Access Control Modifiers

preview_player
Показать описание
Java - Access Control Modifiers
Lecture By: Ms. Monica, Tutorials Point India Private Limited
Рекомендации по теме
Комментарии
Автор

Use coupon “YOUTUBE 12” to get “FLAT 12%” OFF at checkout.

TutorialsPoint_
Автор

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.

haoyangfan
Автор

why are you teaching all these before introducing the concepts of class, objects, method, constructors, and functions? while you're mentioning all these terms

debapratimbhattacharjee
Автор

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.

Sudveep.Kumar.Reddy.Vanteru