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