3.1. Kotlin tutorial

发布时间 : 2025-10-25 13:34:26 UTC      

Page Views: 9 views

Image0

Kotlin is a statically typed programming language that runs on the Java virtual machine, known as the Android world Swift designed, developed and open source by JetBrains .

Kotlin can be compiled into Java bytecode or into JavaScript, making it easyto run on devices without JVM.

In Google I Dot O 2017, Google announced Kotlin become the official development language of Android.

3.1.1. My first Kotlin program #

Kotlin program files to .kt the end, such as: hello.kt app.kt .

Simplest version #

package hello // Optional Baotou fun main(args: Array<String>) { // A package level visible function that accepts an array of strings as parameters println("Hello World!") // Semicolons can be omitted } 

object-oriented #

class Greeter(val name: String) { fun greet() { println("Hello, $name") } } fun main(args: Array<String>) { Greeter("World!").greet() // Creating an object without the new keyword } 

3.1.2. Why choose Kotlin? #

  • Simplicity: greatly reduces the amount of boilerplate code.

  • Security: avoid errors of the entire class, such as null pointer exceptions.

  • Interoperability: take full advantage of existing libraries of JVM, Android,and browsers.

  • Tool-friendly: can be built with any Java IDE or using the command line.

3.1.3. Reference link #

Official website

Official website

Official website - Chinese translation

Kotlin Official Online Tool

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

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