Object(1) 等于 Object.apply(1)
Object(1) = 2 等于 Object.update(1,2)

1
2
3
4
5
6
7
8
9
10
object A{
def apply(){println("object A apply")}
def update(value: String){println("object A update")}
}

object ApplyAndUpdate extends App {
val a = A
a() // = A.apply()
a() = "" // = A.update("")
}