Unit 3 · OOP Concepts

3.3Modifiers

Modifiers are keywords that change how classes, attributes and methods can be used. There are two groups: access modifiers and non-access modifiers.

Access modifiers (private, default, protected, public) answer the question who is allowed to use this? Non-access modifiers (static, final, abstract and others) answer how does this behave? A single declaration can have both kinds, for example public static final double PI.

In this section