Sealed Keyword in Scala
A final modifier in Scala makes a class or trait unavailable for an extension.
On the other hand, making a class public allows any other class to extend from it.
sealed make some restriction of class to inherit by other class in scala .