8.1. Scala tutorial

发布时间 : 2025-10-25 13:35:11 UTC      

Page Views: 9 views

Image0

Scala is a multi-paradigm programming language, which is designed to integrate the features of object-oriented programming and functional programming.

Scala runs on the Java virtual machine and is compatible with existing Java programs.

The Scala source code is compiled into Java bytecode, so it can run on JVM and can call existing Java class libraries.

8.1.1. Who is suitable for this tutorial? #

This tutorial is for developers who want to learn the Scala programming language from scratch. Of course, this tutorial will also go deep into some modules to give you a better understanding of the application of Scala.

8.1.2. Before you take this tutorial, you need to know #

Before continuing this tutorial, you should know some basic computer programming terms. If you have studied the Java programming language, it will help you understand Scala programming faster.

Take the Java tutorial.

8.1.3. The first Scala program: Hello World #

The following are typical examples written in Scala Hello World Program:

Example(HelloWorld.scala) #

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

Save the above code as HelloWorld.scala file, execute the above scala program (you can also execute it directly online):

$scalac HelloWorld.scala//Compile the source code into bytecode $scala HelloWorld//Put the bytecode into the virtual machine to explain and run it 

The output is as follows:

Hello, world! 

8.1.4. Related document recommendation #

The following is a copy Scala language norm.pdf ,the document can be used as a reference for learning.

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。