import java.util.Calendar

//You can call methods on just about anything

println(1.toString)

println(1 to 5)

//No static methods, only better, these belong to singleton or companion objects

class Car private(val year : Int)

object Car {
  def factory = new Car(Calendar.getInstance().get(Calendar.YEAR)) //can limit instances, reuse them, etc. if desired.
}

val car = Car.factory
println(car.year)

//new Car(2011) // not allowed as constructor of Car is private