
Q1: What is the access level of a private modifier in Java?
A1: The access level of a private modifier is only within the class. It cannot be accessed from outside the class.
Q2: What is the accessibility of a public type or member in Java?
A2: The type or member can be accessed by any other code in the same assembly or another assembly that references it.
Q3: How can you access a type or member with a private access modifier in Java?
A3: The type or member can be accessed only by code in the same class.
Q4: How many access modifiers are there in C++?
A4: In C++, there are only three access modifiers.
Q5: How many access modifiers are there in Java?
A5: Java has four access modifiers.
Leave a Reply