0
Can i use 'public' access modifier for all the modules used?
And what is the use of the public access modifier anyway?
3 ответов
+ 1
Encapsulation is used to hide the values or state of a structured data object inside a class, preventing unauthorized parties' direct access to them. When public is defined means that every other class has access to it. Generally internal attributes are private and classes are public.
+ 1
And can I use static keyword for all the modules?
And what is the use of static keyword in front of modules.
0
Static keyword creates fields and methods that belong to the class, rather than to an instance of the class. For exemple, static variables are called class variables, as it belong to the whole class.