How does access modifiers work?
Public: It is the highest visibility access modifier. It makes visible the class members (variables/methods) to any classes (child/non-child) present within same or any package.
Protected: It has lesser visibility than public access modifier. It makes visible the class members (variables/methods) to sub-classes within same or different package and it also make visible in any class of same package.
Default: It has lesser visibility than protected access modifier. It makes visible the class members (variables/methods) to any classes within same package only.
Private: It has least visibility than all access modifiers. It makes visible the class members (variables/methods) within same class only.
| Is This Answer Correct ? | 4 Yes | 0 No |
how session will be expired?
What is bubble sort in java?
What is unsigned char?
Name the types of 'priority'?
How many types of parsers are there?
How can we create a thread in java?
what is the difference between System.exit() and System.exit(1)?
1 Answers eClinical Solutions, eClinical Works, eClinicalWorks,
Explain java thread life cycle.
Explain the private protected method modifier?
Why are functions called methods in java?
What are keywords give examples?
what is Portal(web based online portal)?