2
可能重复:
When to use the equals sign in a Scala method declaration?斯卡拉方法与=(等号)
什么
def x {}
和
def x = {}
之间的区别210
?
可能重复:
When to use the equals sign in a Scala method declaration?斯卡拉方法与=(等号)
什么
def x {}
和
def x = {}
之间的区别210
?
def x {}
被称为“程序”风格,它是def x: Unit = {}
的简写(引用来自this post的维克多巴生)。
肯定!感谢您提供链接@ om-nom-nom。 – Hbf