If you do not specify any access level modifier, the default access level will be ________.
- package-private
- private
- protected
- public
If you do not specify any access level modifier in Java, the default access level will be "package-private" or sometimes referred to as "default." This means that the class, method, or variable is accessible within the same package.
Loading...
Related Quiz
- Consider a case where you have to model a "Book" in a library system. What properties and methods would you define in the Book class and why?
- How does the linear search algorithm find the target value in its input?
- If you do not define a constructor, Java provides one default constructor that initializes all instance variables with ________.
- What is the impact of declaring a constructor private in a class?
- Using ________, we can perform cleanup operations when the stream is closed.