Introduction to Kotlin programing language
Kotlin is an open source statically typed programming language named after an island just like Java was named after an Indonesian island.
Kotlin runs on the JVM and can compile to JavaScript.
Uses for kotlin programming language
Kotlin is a preferred programming language for Android application development second after Java programming language.
Kotlin can be used for artificial intelligence and data science research applications.
Because of its speed kotlin is a well suited programing language for web server application development.
On rare occasions you can use kotlin to develop client side application simply because it can compile to JavaScript.
Hello world application in kotlin programming language
Kotlin applications must have a main method.
println is used for text output just like in Java
fun main() {
println("hello world")
}
After compiling the output should be "hello world"
Basic syntax variable declaration
Variables are declared using
'var' for mutable variables
'val' for immutable variables
Examples
var number: int = 10
val year: int = 2020
Comments
Post a Comment