Hello World in Scala II ;-)

I did my brief research regarding Scala’s object concept. The notion behind the key word object is that every element in Scala language is object even the primitive type int.  So there isn’t even class level fields and methods. For example you can’t implement Singleton design pattern or to use static methods and fields. The way to represent static data or Singleton is definition of object. The Scala object is lazily instantiated by the system hence it’s doesn’t support constructor with multiple arguments. For the whole info regarding object please see http://programming-scala.labs.oreilly.com/ch07.html#ClassesAndObjects.

Leave a Comment

Your email address will not be published. Required fields are marked *