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 happens when a thread cannot acquire a lock on an object? : Java thread
What are the types of arrays in java?
What is tochararray in java?
Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?
Can inner class have constructor?
What are parsing rules?
What is procedure overloading?
What is a type parameter in java?
Which package has light weight components in java programming?
What is += mean in java?
How can you read an integer value from the keyword when the application is runtime in java? example?
What is the purpose of a volatile variable?
Explain illegalmonitorstateexception and when it will be thrown?
Can we have return statement in finally clause? What will happen?
What is the purpose of java?