Scala's sealed abstract vs abstract class

后端 未结 2 1976
自闭症患者
自闭症患者 2021-01-30 10:22

What is the difference between sealed abstract and abstract Scala class?

2条回答
  •  忘了有多久
    2021-01-30 10:43

    The difference is that all subclasses of a sealed class (whether it's abstract or not) must be in the same file as the sealed class.

提交回复
热议问题