def doSomething():Unit = {...}
def doSomething:Unit = {...}
def doSomething() = {...}
def doSomething = {...}
def doSomething() {...}
def doSomething {...} def doSomething():Unit = {...}
def doSomething:Unit = {...}
def doSomething() = {...}
def doSomething = {...}
def doSomething() {...}
def doSomething {...}The empty argument list `()` is a convention to denote that a method has a side-effect, whereas a method with no argument list at all is considered pure.