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
What is module in oop?
Why does java not support operator overloading?
What is a final class ?
Can we declare register variable as global?
What is exception hierarchy in java?
What is assembly condition codes?
How to access arraylist elements in java?
How do you declare an array in java?
What are aggregate functions explain with examples?
What is update method called?
What is package private scope in java?
What is a null check?
What do you understand by classes in java?
What is the point of java?
From the two, which would be easier to write: synchronization code for ten threads or two threads?