Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the Default (Package-Private) access level?
Remember, if no access modifier is specified, it is default.
What happens if you try to access a package-private method from another package?
Consider the visibility rules of Java.
What does Default (Package-Private) access allow?
Think about where classes can see each other.
True or False: A class with Default access can be imported by other packages.
Recall the rule for package-private access.
Create a full Java example demonstrating Default access with multiple classes in one package.
Remember to not specify an access modifier for package-private.
Explain how changing a package-private method might affect other classes in the same package. Give an example.
Consider the interconnectedness of package classes.
4 more questions in this section. Enroll free to practise them all.
Enroll free