Why "main method should be static" occurs if object name is "Statistic" in Scala
<p>the code below:</p>

<pre><code>object Statistic{
    def main(args:Array[String]):Unit={}
}
</code></pre>

<p>will report error "main method should be static"</p>

<p>but if object name is not "Statistic" like below,no error reported:</p>

<pre><code>object Statistics{
    def main(args:Array[String]):Unit={}
}
</code></pre>

<p>and i'm using IDEA for Scala</p>