How to move main method to another class in Scala?
问题 IntelliJ IDEA 10.5 (probably this matters). I am new to Scala, so I started in an akward way. I created one file with two classes -- empty MainApp and another class, HelloWorld with method main. I compiled it and executed -- IntelliJ automatically detected HelloWorld as main class. It was OK. Then, I moved main method to MainApp, and deleted (then empty) HelloWorld class. When I tried to run it, IntelliJ sticked to HelloWorld nevertheless. So I reconfigured project and selected MainApp as