Keywords Flashcards
1
Q
How does the protected keyword function?
A
A protected keyword allows access from classes that are either subclasses of the class contains the thing containing the keyword or is a class within the same package or both.
It won’t allow access from classes that are both of a different package and of a non-connected class.
2
Q
What is the qualified name ?
A
It’s the unique name that a class has in a package.
For example, a class in a package “users” which is in a package “onlineShop” should be declared as:
onlineShop.users.Customer nameOfCustomer = new Customer();