I'm new at Kotlin and I'm reading the kotlin official documentation, it states the 4 differents visibility modifiers (public, private, internal, protected) furthermore it's also using the keyword OPEN to express that a class can be extended (that is its purpose). My question is, can OPEN be considered as a Visibility Modifier?
Asked
Active
Viewed 117 times
0
-
2No, it doesn’t impact visibility. It’s an inheritance modifier. – Tenfour04 Sep 26 '21 at 14:59
1 Answers
1
No, open
is not a visibility modifier, as it does not affect visibility at all.
Instead, open
affects if classes or methods can be extended/overridden and is the opposite of javas final
in these cases.

F43nd1r
- 7,690
- 3
- 24
- 62