Question: Consider the following code snippet: public class Vehicle { protected int numberAxles; } Which statement is true about the accessibility of data in the variable?
Consider the following code snippet:
public class Vehicle
protected int numberAxles;
Which statement is true about the accessibility of data in the
variable?
It is accessible by any class.
It is only accessible by the
class's methods and by all of its subclasses
It is only accessible by the
class's methods, by all of its subclasses, and by methods in
classes within the same package.
It is only accessible by the
class's methods.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
