0

I have following code snippet:

def now = System.currentTimeMillis

When I want to invoke the now function in REPL, just

now

why not

now()

and shows the error

<console>:9: error: Long does not take parameters
              now( )
softshipper
  • 32,463
  • 51
  • 192
  • 400
  • try adding parens to your definition – Brian Kent Sep 21 '15 at 19:38
  • 8
    possible duplicate of [What is the difference between def foo = {} and def foo() = {} in Scala?](http://stackoverflow.com/questions/7409502/what-is-the-difference-between-def-foo-and-def-foo-in-scala) – childofsoong Sep 21 '15 at 19:47

0 Answers0