f(arg1, arg2, ···)
f.apply(arg1, arg2, ···)
f(arg1, arg2, ···) = ...
f.update(arg1, arg2, ···) = ...
val scores = Map()
scores("Bob")=100 //调用scores.update("bob",100)
val bobscrore = scores("Bob")//调用scores.apply("bob")
apply方法通常被用在伴生对象中,用来构造对象而不是显示的使用new。