Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What is true about the protected keyword in terms of inheritance? Group of answer choices Protected members of a class have extra security built in
What is true about the protected keyword in terms of inheritance?
Group of answer choices
Protected members of a class have extra security built in via the compiler.
If you don't use protected, you have to rely on the public interface of the parent class to accessuse parent functionality
Protected items are accessible within the scope of child classes but inaccessible outside to outside scope.
Protected members are inaccessible in child classes, we use private to make them accessible.
Shockingly protected properties and methods are accessible within the scope of anything that shares the package of the class.
This is actually true free point I forgot to mention this in lecture because I often don't use packages in my sample code for the sake of time. This is a Java feature.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started