From 13499abffffca5d338590360b5f1dbed406cb7e4 Mon Sep 17 00:00:00 2001 From: heibaiying <31504331+heibaiying@users.noreply.github.com> Date: Sat, 11 May 2019 18:53:21 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Scala=E6=A8=A1=E5=BC=8F=E5=8C=B9?= =?UTF-8?q?=E9=85=8D.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notes/Scala模式匹配.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/notes/Scala模式匹配.md b/notes/Scala模式匹配.md index a260480..f43951f 100644 --- a/notes/Scala模式匹配.md +++ b/notes/Scala模式匹配.md @@ -121,22 +121,17 @@ def unapplySeq[T](x : scala.Array[T]) : scala.Option[scala.IndexedSeq[T]] = { /* ```scala //声明一个抽象类 -abstract class Person{ -} +abstract class Person{} ``` ```scala // 样例类Employee -case class Employee(name: String, age: Int, salary: Double) extends Person { - -} +case class Employee(name: String, age: Int, salary: Double) extends Person {} ``` ```scala // 样例类Student -case class Student(name: String, age: Int) extends Person { - -} +case class Student(name: String, age: Int) extends Person {} ``` 当你声明样例类后,编译器自动进行以下配置: