+ 1

why to use starting by public

19th Jan 2022, 4:12 PM
Anmol Singh
3 Answers
+ 5
Anmol Singh Continue with the course, you'll learn about access modifiers (default, public, protected, private) in the classes and objects section of the course, and that should answer your question. Just follow along for now.
19th Jan 2022, 5:33 PM
ChaoticDawg
ChaoticDawg - avatar
+ 1
with public it is "visible" for other packages, without it can be used only for its package
19th Jan 2022, 8:45 PM
zemiak
0
Level of accessibility for access modifiers, from least accessible to most accessible is as follows: private(no access) -> default(no modifier) -> protected -> public Hope this helps.
20th Jan 2022, 8:10 AM
Adrian