Oracle
1Z0-815 · Question #17
Which statement about access modifiers is correct?
The correct answer is E. An interface can be declared with the protected modifier. https://javabeginnerstutorial.com/core-java-tutorial/instance-variable-java/
Applying Encapsulation
Question
Which statement about access modifiers is correct?
Options
- AAn instance variable can be declared with the static modifier.
- BA local variable can be declared with the final modifier.
- CAn abstract method can be declared with the private modifier.
- DAn inner class cannot be declared with the public modifier.
- EAn interface can be declared with the protected modifier.
How the community answered
(70 responses)- A10% (7)
- B3% (2)
- C6% (4)
- D1% (1)
- E80% (56)
Explanation
https://javabeginnerstutorial.com/core-java-tutorial/instance-variable-java/
Topics
#access modifiers#interface declaration#abstract method#inner class
Community Discussion
No community discussion yet for this question.