what is the difference between the Main and the main() method in scala?

前端 未结 0 958
名媛妹妹
名媛妹妹 2021-01-17 01:25
object sad extends App{
var x = 100
println(Main.x+"  "+x)}

The result is 100 100 The following code works perfectly and gives same result

相关标签:
回答
  • 消灭零回复
提交回复
热议问题