scala object extends app does not print anything
<p>I am learning Scala and as part of the journey I had come across two different ways to write your scala class - one with a main method and other without the main method  but by extending App (earlier <strong>Application</strong> is <em>deprecated</em> due to concurrency issues).</p>

<p>I am executing the scripts in Command Line via <code>scala</code> executable as <code>scala &lt;nameOfScript&gt;.scala</code>. I run <strong>Scala 2.11.7</strong> in <strong>Windows</strong>.</p>

<p>I have no issues when running a scala script/class with a main method.</p>

<pre><code>object ObjectWithMainMethod {
    def main(args:Array[String]) = {
            println("Object with a main() method executed..")
    }
}
</code></pre>

<p>It produces the following output.</p>

<pre><code>Object with a main() method executed..
</code></pre>

<p>But, I don't get the output with its counterpart, which is extending App trait but without the main method.</p>

<pre><code>object AppWithoutMainMethod extends App {
    println("AppWithout main() method executed")
}
</code></pre>

<p>When I run this scala script, it does not print anything. However, when I looked at the complied .class files via <em>javap</em> utility, I could see the PSVM (public static void main() method) inside. </p>

<p>Am I missing something? Any help on this will be highly appreciated.</p>