對於在進行模式比對時,一定要出現的案例類型,可以將之密封(Sealed),例如: sealed abstract class Drawing case class Point(x: Int, y: Int) extends Drawing
確定! 回上一頁