Skip to content
Siddhant edited this page Dec 6, 2017 · 6 revisions

Kotlin

Kotlin is a statically-typed programming language that runs on the Java virtual machine and also can be compiled to JavaScript source code or use the LLVM compiler infrastructure. Its primary development is from a team of JetBrains programmers

Difference between var and val

var is variable, you can reassign value. val is constant, once value is assigned it can not be changed like final in java For example
var name:String=null
val batch:String=null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
name="Siddhant"
}

Clone this wiki locally