How many access modifiers are in java ?
A. 3
B. 5
C. 4
D. 2
Answer: Option C
Solution(By Examveda Team)
Java provides a number of access modifiers to set access levels for classes, variables, methods, and constructors. The four access levels are −Visible to the package, the default. No modifiers are needed.
Visible to the class only (private).
Visible to the world (public).
Visible to the package and all subclasses (protected).
Related User Ask Questions
Which of the following is not a primary function of a Bank?
A. Granting Loans
B. Collecting Cheques/Drafts customers
C. Facilitating import of goods
D. Issuing Bank Drafts
A. Regulatory jurisdictional fight between SEBI and IRDA
B. They don’t offer better tax benefits
C. They offer lesser returns compared to traditional insurance policies
D. All of the above
The Chameli Devi Jain Award is given for an outstanding woman ____?
A. Scientist
B. Reporter
C. Player
D. Teacher
Join The Discussion