我似乎无法找到它在任何地方做的事情.例如,假设您有一个方法,如
def SomeFunction(a: String): String ={
???
}
Run Code Online (Sandbox Code Playgroud)
三重问号表示什么?
Lee*_*Lee 27
???
被定义在Predef
与简单地抛出一个NotImplementedError
:
def ??? : Nothing = throw new NotImplementedError
Run Code Online (Sandbox Code Playgroud)
它的返回类型Nothing
是每种类型的子类型,因此可以用来代替任何返回值.