Possible Duplicate:
“new” keyword in Scala
Ive noticed that creating certain instances in Scala you can leave off using new
. When is it required that a developer use new
? And why do some objects allow you to miss off using it?
Thanks
List("this","is","a","list") creates a List of those four strings; no new required
Map("foo" -> 45, "bar" ->76) creates a Map of String to Int, no new required and no clumsy helper class.
Taken from here..