Q:

Write a Scala program to print "Hello, world" and version of the Scala language

0

Write a Scala program to print "Hello, world" and version of the Scala language.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

object HelloWorld {
  def main(args: Array[String]): Unit = {
    println("Hello, world!")
    println("Scala language: "+util.Properties.versionString)
  }
}

Sample Output:

Hello, world!
Scala language: version 2.13.3

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now