2010-12-10 39 views

回答

0

I'm running main.scala and there is a object of name MyServer. Is it necessary to create a class for it.

不,你不需要创建一个类。所有你需要的是一个main方法的对象:

def main(args: Array[String]): Unit = { println("hello") } 

不管怎么说,提供更多的信息:代码,你如何尝试运行它,楼宇系统,IDE等