Is there a way to execute a scala class using eclipse? : <p>Im very new to Scala programming and learning it. One of the interesting thing for me in Scala is most of the times the topics are explain by writing Scala Objects.
I tried to write a small scala class in eclipse in two separate classes and created an object like below.</p>

<pre><code>package com.scala.programs

class DisplayStatement {
  def hello(name:String):String = {
    return "Hello " + name
  }
}
</code></pre>

<p>My Main class is in another packacge and in another class:</p>

<pre><code>package com.scala.mainclasses

import com.scala.programs.DisplayStatement

class Display {
  def main(args: Array[String]) {
    DisplayStatement ds = new DisplayStatement();
    ds.hello("scala");
  }
}
</code></pre>

<p>I tried to do it just like it is Java. But Im getting error in these two statements.</p>

<pre><code>DisplayStatement ds = new DisplayStatement();
ds.hello("scala");
</code></pre>

<p>Below are the error messages:</p>

<pre><code>Error Messages: not found: value DisplayStatement
not found: value ds
</code></pre>

<p>I understood it when a scala object is written and executed.
I know that Im making some mistake here but can anyone tell me how to create an object of a class and execute it in Scala programming or is it possible and why is it most of the times the programs are written in the form of Object directly rather class.</p>
