Answer Posted / javamasque
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 |
Post New Answer View All Answers
Where are local variables stored?
What does yield method of the thread class do?
What happens if an exception is throws from an object's destructor?
Does unicode support all languages?
How do you convert bytes to character in java?
What is the concatenation operator in java?
What is return keyword in java?
What is exception propagation?
What is a static method in java?
What are static blocks and static initalizers in java ?
What is default constructors?
Is treeset sorted in java?
What is an exception in java?
How to do encapsulation in java?
What is finally and finalize in java?