Looking at this code from Scala in Depth...
scala> trait Foo {
| def someMethod(): Int = 5
| }
defined trait Foo
scala> class Main() extends Foo {
| }
defined class Main
Then, I created a new Main
(without the parentheses).
scala> class Main extends Foo {}
defined class Main
What is the meaning the parentheses in class Main()
? How about without parentheses?