code below:
object Statistic{
def main(args:Array[String]):Unit={}
}
will report an error "the main method must be static"
but if the name of the object is not “Statistical,” as indicated below, no error is reported:
object Statistics{
def main(args:Array[String]):Unit={}
}
and I use IDEA for Scala
source
share