Unit1 Unit1 - 1 year ago 96
Scala Question

Scala : Significance of file generated with $ during compile

Please note that I am beginner to Scala. Can someone please explain what is the significance of the class file with $ in it.

-rw-r--r-- 1 rodiee staff 130 Aug 9 10:39 HelloWorld.scala

-rw-r--r-- 1 rodiee staff 586 Aug 9 10:40 HelloWorld.class

-rw-r--r-- 1 rodiee staff 635 Aug 9 10:40 HelloWorld$.class

-Scala Beginner

Answer Source

The files ending with $ are jvm static classes related to the "singleton" objects in your .scala files

You can read this other answer for reference: Singletons as Synthetic classes in Scala?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download