We talked about getting started with Scala, but after all, it's not like scripting language, and Scala is talking about replacing Java, so we'll see how he grabs the Java position.
A common editor for Scala, see below:
Eclipse is not an effective combination with Maven, including SVN, which is gradually getting people thinking about other Ides, but this does not affect eclipse's beauty. I chose to use Eclipse as the IDE.
First step to install eclipse
Second step in Help->eclipse marketplace-> search scala-> Install Scala plugin (may need to restart Eclipse)
Step three Windows->open perspective-> Scala
Fourth step in the package Explorer right-click->new, Scala project
Fifth Step on SRC right click on New->package->demo.scala
Sixth step in package Demo.scala right New->scala Object (note here not Class)
Seventh Step
Write code:
def main (args:array[string]) = {println ("Hellowold")}
Eighth step
Right-click->run as->scala application
Attention:
Scala also has a way of running
Object Helloworld extends application {println ("Hello, world!")}
Object Helloworld extends App{println ("Hello, world!")}
These two ways can be used as one, you can directly run the function, do not need to write the Main method
This article is from the "Scholar" blog, please make sure to keep this source http://yjplxq.blog.51cto.com/4081353/1412112