Skip to content

Instantly share code, notes, and snippets.

@YugandharVadlamudi
Last active June 24, 2018 15:07
Show Gist options
  • Save YugandharVadlamudi/eadb1358cdcb12d38a65311b0a2cea35 to your computer and use it in GitHub Desktop.
Save YugandharVadlamudi/eadb1358cdcb12d38a65311b0a2cea35 to your computer and use it in GitHub Desktop.
Val variable declaration in kotlin
fun main(args: Array<String>) {
val hello = "hello"
//value can not be reinitialized because it is like final variable in java
hello = "dlkjf" // it will produce an compile time error
println("$hello")
}
###output###
hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment