0

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?

Leandro Maro
  • 325
  • 1
  • 12

1 Answers1

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