Step4. Write some Scala scripts
A script is just a sequence of statements in a file that will be executed sequentially.
Put this into a file named hello.scala:
println("Hello, world, from a script!")
$ scala hello.scala
Hello, world, from a script!
To try this out, type the following into a new file named helloarg.scala
// Say hello to the first argument
println("Hello, "+ args(0) +"!")
$ scala helloarg.scala planet
Hello, planet!
댓글 없음:
댓글 쓰기