Question: Which statements about the use of modifiers are true? Select the two correct answers. (a) If no accessibility modifier (public, protected, or private) is specified

Which statements about the use of modifiers are true?

Select the two correct answers.

(a) If no accessibility modifier (public, protected, or private) is specified for a member declaration, the member is accessible only by classes in the package of its class and by subclasses of its class in any package.

(b) You cannot specify accessibility of local variables. They are accessible only within the block in which they are declared.

(c) Subclasses of a class must reside in the same package as the class they extend.

(d) Local variables can be declared as static.

(e) The objects themselves do not have any accessibility modifiers; only field references do.

Step by Step Solution

3.40 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

b and e If no accessibility modifier public protected or private is given in ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!