What is the difference between "app" and "app $" in Intellij?
1 answer
For jvm
HelloWorld$
is the singleton class HelloWorld
.
Scala generates a class ObjectName$
for every object ObjectName
.
It also creates static methods in this class, which looks like this:
public static void main(String[] args) {
MODULE$.main(args);
}
From, java
you can either get an instance of an object ObjectName
using a static field ObjectName$.MODULE$
, or call static proxy methods on ObjectName$
.
+4
source to share