A class design requires that a particular member variable must be accessible by any subclasses of this class, but otherwise not by classes which are not members of the same package. What should be done to achieve this?
a. The variable should be marked public.
b. The variable should be marked private.
c. The variable should be marked protected.
d. The variable should have no special access modifier.
e. The variable should be marked private and an accessor method provided.
c See the section on the protected modifier.
You might also like to view...
Which of the following statements is false?
a. By default a ListView supports multiple selection—many items at a time may be selected. ListViews also support single selection. b. The type of selection is managed by the ListView’s MultipleSe-lectionModel (a subclass of SelectionModel from package ja-vafx.scene.control), which contains observable properties and various methods for manipulating the corresponding ListView’s items. c. To respond to selection changes, you register a listener for the MultipleSelectionModel’s selectedItem property (lines 41–43). d. ListView method getSelectionModel returns a MultipleSe-lectionModel object.
The Screenshot Tool enables you to capture a full desktop screen, a window, a rectangular portion of a screen, or a free-form shape on the screen
Indicate whether the statement is true or false
You have a 255.255.252.0 mask. Which of the following is the valid CIDR notation?
A) /20 B) /21 C) /22 D) /23
If a function of a class is static, it is declared in the class definition using the keyword static in its ____.
A. return type B. parameters C. heading D. main function