protected
An access modifier that permits package access and access through subclasses.
What is protected in Java?
protected — An access modifier that permits package access and access through subclasses.
class Account {
private int balance = 20;
public int balance() {
return balance;
}
}
Level: Journeyman · More Java terms at this level
Updated