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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly