I am the newbie trying out to learn Scala. But I got stumped in the very first Hello World Program. Following is the simple program "HelloWorld.scala" that I am trying to run :
I am able to get the result if I use above code on command line. But, when I try to run this code in the script , I am getting following error :
I am not able to figure out the reason for this error. Kindly help me out to know the solution.
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12612
posted
0
Works fine for me.
Oh, wait; why are you trying to run "scala" when you're already in scala??? Exit out of the REPL first.
swapnil nawale
Greenhorn
Joined: Sep 01, 2010
Posts: 3
posted
0
Thanks David Newton. My silly mistake. I came out of REPL and was able to run script successfully.
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12612
posted
0
Glad you worked it out :) And welcome to JavaRanch!