Sponsored Links

Ad by Google
The Scala stands for "Scalable language", Scala is pure object oriented programming language as well as fully supported functional programming. Scala is concise and very much compatible with Java programming language. The syntax of Scala is very much similar to Java, one can easily mix both Scala and Java code in one place. It's a high level language with strongly statically typed, the execution model of Scala is derived from Java.
For more on Scala overview you may read this and for Scala installation you may read Scala installation guide. Although Scala is very much similar to Java, but still it has various differences that's why nowadays Scala is on demanding, for detailed differences between Scala and Java read Scala vs Java separate post.
In this tutorial, I am going to show you an example of Hello World program in Scala using eclipse IDE.
Step 1: Open IDE,Go to File->New->Scala Project
It will ask for project name, provide the project name and click on Finish button.

Step 2: Right click on newly created project go to New->Scala Object
It will ask for name, provide the name, below is the Create New File wizard.
Once done, it will open an editor to write your code.

Step 3: Hello world code.
package com.javamakeuse.tutorial

object HelloWorld {
  def main(args: Array[String]) {
     println("Hello, world!")

Step 4: Run it.
Output : Hello, world!

That's it.
Sponsored Links


Post a Comment